D15645: Add scheme selection menu with a "System" entry.

Amish Naidu noreply at phabricator.kde.org
Sun Oct 28 09:41:08 GMT 2018


amhndu updated this revision to Diff 44342.
amhndu added a comment.


  > kcolorschemedemo.cpp does not actually seem to build an executable.
  
  It should build `kcolorschemedemo` in `kconfigwidgets/bin` (also has `kcolorschemedemo` target in make)
  
  > Regardless, wouldn't it make sense to expose this new feature in the existing Settings → Color Theme menu? Or are you planning to do that in another patch?
  
  Yes, that would require a patch for each application that'd use it. The problem is that with the new menu,
  we need a way to distinguish between the reset action and the other actions.
  So that applications don't just save the current system scheme in their config, if they did,
  the application would still use the previous scheme even after the user changed the system scheme. While resetting should mean the app
  should now be following the scheme, just as before setting anything manually.
  The new variant has the index as the data instead of the path, this allows checking the index's DisplayRole
  and the action's text to distinguish the reset, this is admittedly not a very good solution.
  I couldnnott think of anything else that's simple and wouldn't require much change in client code.
  What could be an alternative solution here ?
  I've thought of creating a subclass of KActionMenu which has two signals - one for reset and one for setting a scheme and returning that,
  but that would again require modifying applications to use these signals instead.
  
  > instead of a custom variant, what about creating new versions of the createSchemeSelectionMenu functions that take flags instead?
  
  I created a new variant since this isn't compatible with the other overload, as explained above.

REPOSITORY
  R265 KConfigWidgets

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15645?vs=44279&id=44342

BRANCH
  system-default

REVISION DETAIL
  https://phabricator.kde.org/D15645

AFFECTED FILES
  src/kcolorschememanager.cpp
  src/kcolorschememanager.h
  src/kcolorschememanager_p.h
  tests/kcolorschemedemo.cpp

To: amhndu, #frameworks, broulik, cfeck, elvisangelaccio, ngraham, pino
Cc: pino, ngraham, broulik, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181028/4c528922/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list