summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Savochenko <roman@oscada.org>2020-10-25 15:56:11 +0800
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-11-05 18:39:42 +0800
commit2c39500f358c3bed18311d4854e22aa058d8262c (patch)
tree4f0cb6df805c2be0e9aba4acc08e8111b6551be3
parentfb5b1b9e9f5d09e53156536385ab26834ae1557d (diff)
downloadtdeutils-2c39500f358c3bed18311d4854e22aa058d8262c.tar.gz
tdeutils-2c39500f358c3bed18311d4854e22aa058d8262c.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>
-rw-r--r--kmilo/generic/generic_monitor.cpp14
-rw-r--r--kmilo/generic/generic_monitor.h2
2 files changed, 15 insertions, 1 deletions
diff --git a/kmilo/generic/generic_monitor.cpp b/kmilo/generic/generic_monitor.cpp
index 35bf2c5..264594f 100644
--- a/kmilo/generic/generic_monitor.cpp
+++ b/kmilo/generic/generic_monitor.cpp
@@ -93,7 +93,9 @@ bool GenericMonitor::init()
{ "SlowVolumeDown", TQt::CTRL+TQt::Key_VolumeDown, TQT_SLOT(slowVolumeDown()) },
{ "Mute", TDEShortcut("XF86AudioMute"), TQT_SLOT(mute()) },
{ "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()) }
};
ga = new TDEGlobalAccel(this, "miloGenericAccel");
@@ -334,6 +336,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 b5d6897..e92bac6 100644
--- a/kmilo/generic/generic_monitor.h
+++ b/kmilo/generic/generic_monitor.h
@@ -66,6 +66,8 @@ public slots:
void mute();
void brightnessUp();
void brightnessDown();
+ void brightnessSlowUp();
+ void brightnessSlowDown();
void launchMail();
void launchBrowser();
void launchSearch();