This adds a new submenu to the View menu, which contains the existing Change Colors options.
There is an action to toggle Change Colors on and off, and an action group to choose the Change Colors mode.
The menu is an KActionMenu, so it can be plugged into the toolbar for quicker access.
The KActionMenu is checkable, so toggling Change Colors just means to click the toolbar button once.
This //might// be useful as soon as someone implements a useful Change Colors mode.
D21196 is related to this, because it gives the View Mode menu a similar usage pattern.
This also fixes 407217, because the button does toggle now.
BUG: 407217
Screenshots from before can be found in D21196, or from the bug report: https://bugsfiles.kde.org/attachment.cgi?id=119841
Screenshot after:
{F6821937}
TODO
====
[x] Actions are not syncronized across tabs. Implement this feature in Part or PageView or where? See D21195#118908 (Normal in Okular)
[x] Assigning shortcuts doesn’t work. See D21195#464866 (Normal in Okular)
[x] Assigning shortcuts doesn’t work. ] Remove CheckableActionMenu by just adding the KActionMenu indepently to the KActionCollection, like done with the ‘Selection Tools’ button? See D21195#4648668175 (replaced by following)
(Normal in Okular)[ ] Use ToggleActionMenu instead of CheckableActionMenu.
[ ] Remove CheckableActionMenu by just adding the KActionMenu indepently to the KActionCollection, like done with the ‘Selection Tools’ button? See D21195#468175Show the current color mode in the toolbar button.
[ ] Find Icons for ‘Change Dark & Light Colors’ and ‘Change Paper Color’
[ ] Expose to D-Bus. See D21195#inline-119670
[ ] Get the correct ‘&’ into the action text, not ‘&&’. See D21195#464938
[ ] Cast to int or not? See D21195#inline-119107
Future
------
[ ] Add ‘Invert Lightness’ color mode?