The new shortcut can be useful if a user wants to quickly disable the
Night Color manager for a brief moment.
FEATURE: 409083
davidedmundson | |
romangg |
KWin |
The new shortcut can be useful if a user wants to quickly disable the
Night Color manager for a brief moment.
FEATURE: 409083
Lint OK |
No Unit Test Coverage |
Buildable 13747 | |
Build 13765: arc lint + arc unit |
colorcorrection/manager.cpp | ||
---|---|---|
174 | I don't think it needs the word "Manager" in the UI. |
colorcorrection/manager.cpp | ||
---|---|---|
172 | Everywhere else in KWin (and other apps) we use a KActionCollection for this: m_actionCollection = new KActionCollection(this, QStringLiteral("kwin")); m_actionCollection->setComponentDisplayName(i18n("KWin")); with m_actionCollection->addAction (which sets the objectName) | |
176 | Given we don't actually set a shortcut, isn't KGlobalAccel::self()->setShortcut(action, QList<QKeySequence>{}); the proper way? |
Having a shortcut for Night Color activation/toggle: +1
We need some kind of visual feedback when the shortcut gets triggered, like the volume indicator.
Wouldn't the visible feedback be that the screen's colors change? Or actually I guess that's not guaranteed because you might be toggling it on, but the current mode would make it activate later in the day. In that case, yeah, showing an OSD would be nice.
We can display an OSD on Wayland, but not on X11.
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText document-edit 'redshift wooo!!!!1'
This would put plasmashell as a dependency of kwin. I'd rather go with using the internal osd service. Once we finish porting our QPA away from Wayland, the OSD service should become available on X11.
This would put plasmashell as a dependency of kwin
It's not a dependency, it's a dbus call that could be implemented by someone else. It is also already used in KWin for when toggling the virtual keyboard and keyboard layouts, so this is only consistent.
colorcorrection/manager.cpp | ||
---|---|---|
176 | It's not. There's a difference. one calls updateGlobalShortcut(KGlobalAccelPrivate::DefaultShortcut | KGlobalAccelPrivate::ActiveShortcut); the other updateGlobalShortcut(KGlobalAccelPrivate::ActiveShortcut); but it doesn't really matter in this case |
colorcorrection/manager.cpp | ||
---|---|---|
170 ↗ | (On Diff #61208) | What would be nice is if it shows the current active mode. I.e. Night Color: Automatic. But can be added later. |