diff options
author | Roman Savochenko <roman@oscada.org> | 2020-10-25 15:41:28 +0800 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-10-25 15:41:28 +0800 |
commit | 5c212d1abc9b736b22c9432b45486914d3f31359 (patch) | |
tree | 7bd769d11c36c4a804b85c5f1accb6d24a70c6eb /kmilo | |
parent | 7c125a1b8ef2b258fbd995dbfa4c36eb29265b0b (diff) | |
download | tdeutils-5c212d1abc9b736b22c9432b45486914d3f31359.tar.gz tdeutils-5c212d1abc9b736b22c9432b45486914d3f31359.zip |
kmilo: added keyboard shortcuts for fine settings of screen brightness.
Signed-off-by: Roman Savochenko <roman@oscada.org>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kmilo')
-rw-r--r-- | kmilo/generic/generic_monitor.cpp | 14 | ||||
-rw-r--r-- | kmilo/generic/generic_monitor.h | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/kmilo/generic/generic_monitor.cpp b/kmilo/generic/generic_monitor.cpp index 216cee0..739b266 100644 --- a/kmilo/generic/generic_monitor.cpp +++ b/kmilo/generic/generic_monitor.cpp @@ -69,7 +69,9 @@ static const ShortcutInfo shortcuts[] = { "SlowVolumeDown", TQt::CTRL+TQt::Key_VolumeDown, TQT_SLOT(slowVolumeDown()) }, { "Mute", TDEShortcut("XF86AudioMute"), TQT_SLOT(toggleMute()) }, { "BrightnessUp", TDEShortcut("XF86MonBrightnessUp"), TQT_SLOT(brightnessUp()) }, - { "BrightnessDown", TDEShortcut("XF86MonBrightnessDown"), TQT_SLOT(brightnessDown()) } + { "BrightnessDown", TDEShortcut("XF86MonBrightnessDown"), TQT_SLOT(brightnessDown()) }, + { "BrightnessSlowUp", TDEShortcut("Ctrl+XF86MonBrightnessUp"), TQT_SLOT(brightnessSlowUp()) }, + { "BrightnessSlowDown", TDEShortcut("Ctrl+XF86MonBrightnessDown"), TQT_SLOT(brightnessSlowDown()) } }; GenericMonitor::GenericMonitor(TQObject *parent, const char *name, const TQStringList& args) @@ -261,6 +263,16 @@ void GenericMonitor::brightnessDown() brightnessChange(-1, 10); } +void GenericMonitor::brightnessSlowUp() +{ + brightnessChange(1, 1); +} + +void GenericMonitor::brightnessSlowDown() +{ + brightnessChange(-1, 1); +} + void GenericMonitor::brightnessChange(int direction, int step) { if (!tdepowersave) diff --git a/kmilo/generic/generic_monitor.h b/kmilo/generic/generic_monitor.h index d7d7fb4..6968d2c 100644 --- a/kmilo/generic/generic_monitor.h +++ b/kmilo/generic/generic_monitor.h @@ -57,6 +57,8 @@ public slots: void toggleMute(); void brightnessUp(); void brightnessDown(); + void brightnessSlowUp(); + void brightnessSlowDown(); void launchMail(); void launchBrowser(); void launchSearch(); |