diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-08-18 18:27:33 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-08-19 11:01:51 +0900 |
commit | b1934dda614fa4178a4a3213c2c9a649852d6cb5 (patch) | |
tree | 0e406e4bb3b0eb8df35d7604a5fda36035f0cc20 /twin/options.cpp | |
parent | 7cb82d805bb77cdeb009e1a2ef59ab3fdf2476af (diff) | |
download | tdebase-b1934dda614fa4178a4a3213c2c9a649852d6cb5.tar.gz tdebase-b1934dda614fa4178a4a3213c2c9a649852d6cb5.zip |
Added checkbox to invert mouse wheel direction in window's titlebar and frame actions.
This resolves issue TDE/tde#64.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 11a496c359b8d2d87433f5cb2b06545a08d001d5)
Diffstat (limited to 'twin/options.cpp')
-rw-r--r-- | twin/options.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/twin/options.cpp b/twin/options.cpp index 0bb127e11..ce35f6d06 100644 --- a/twin/options.cpp +++ b/twin/options.cpp @@ -71,12 +71,12 @@ unsigned long Options::updateSettings() altTabStyle = KDE; // what a default :-) if ( val == "CDE" ) altTabStyle = CDE; - + separateScreenFocus = config->readBoolEntry( "SeparateScreenFocus", false ); activeMouseScreen = config->readBoolEntry( "ActiveMouseScreen", focusPolicy != ClickToFocus ); rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE); - + // focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 ); // TODO use low level for now focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 1 ); @@ -101,14 +101,14 @@ unsigned long Options::updateSettings() animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE ); animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 ); - if( focusPolicy == ClickToFocus ) + if( focusPolicy == ClickToFocus ) { autoRaise = false; autoRaiseInterval = 0; delayFocus = false; delayFocusInterval = 0; } - else + else { autoRaise = config->readBoolEntry("AutoRaise", FALSE ); autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 ); @@ -159,6 +159,7 @@ unsigned long Options::updateSettings() CmdInactiveTitlebar2 = mouseCommand(config->readEntry("CommandInactiveTitlebar2","Activate and lower"), true ); CmdInactiveTitlebar3 = mouseCommand(config->readEntry("CommandInactiveTitlebar3","Operations menu"), true ); CmdTitlebarWheel = mouseWheelCommand(config->readEntry("CommandTitlebarWheel","Nothing")); + CmdTitlebarRevWheel = config->readBoolEntry("CommandTitlebarReverseWheel", false); CmdWindow1 = mouseCommand(config->readEntry("CommandWindow1","Activate, raise and pass click"), false ); CmdWindow2 = mouseCommand(config->readEntry("CommandWindow2","Activate and pass click"), false ); CmdWindow3 = mouseCommand(config->readEntry("CommandWindow3","Activate and pass click"), false ); @@ -167,6 +168,7 @@ unsigned long Options::updateSettings() CmdAll2 = mouseCommand(config->readEntry("CommandAll2","Toggle raise and lower"), false ); CmdAll3 = mouseCommand(config->readEntry("CommandAll3","Resize"), false ); CmdAllWheel = mouseWheelCommand(config->readEntry("CommandAllWheel","Nothing")); + CmdAllRevWheel = config->readBoolEntry("CommandAllReverseWheel", false); //translucency settings config->setGroup( "Notification Messages" ); @@ -193,7 +195,7 @@ unsigned long Options::updateSettings() resetKompmgr = config->readBoolEntry("ResetKompmgr", false); if (resetKompmgr) config->writeEntry("ResetKompmgr",FALSE); - + // window drop shadows config->setGroup("Style"); shadow_colour = config->readColorEntry("ShadowColour", &TQt::black); @@ -213,7 +215,7 @@ unsigned long Options::updateSettings() shadow_x_offset = config->readNumEntry("ShadowXOffset", 0); shadow_y_offset = config->readNumEntry("ShadowYOffset", 10); - + // Read button tooltip animation effect from kdeglobals // Since we want to allow users to enable window decoration tooltips // and not tdestyle tooltips and vise-versa, we don't read the @@ -227,7 +229,7 @@ unsigned long Options::updateSettings() desktop_topmenu = kdesktopcfg.readBoolEntry( "ShowMenubar", false ); if( desktop_topmenu ) topmenus = true; - + TQToolTip::setGloballyEnabled( d->show_tooltips ); return changed; @@ -386,8 +388,12 @@ bool Options::checkIgnoreFocusStealing( const Client* c ) return ignoreFocusStealingClasses.contains(TQString::fromLatin1(c->resourceClass())); } -Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int delta ) +Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int delta, bool revDir ) + { + if (revDir) { + delta = -delta; + } switch( com ) { case MouseWheelRaiseLower: |