From 663d139638b4d402da2f898f2769d3af5ac2ccb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Feber?= Date: Thu, 5 Sep 2019 19:41:27 +0200 Subject: [PATCH] [kcmkwin/options] Improve the look of the KWin options KCM UIs Summary: Apply the KDE HIG, use form layouts, make desktop files consistent and make the KCMs look better. {F7323519} {F7330485} {F7330486} {F7302318} {F7302319} Test Plan: Open the {nav Window Behavior} KCMs. All options should still work Reviewers: #kwin, #plasma, #vdg, ngraham, zzag Reviewed By: #kwin, #plasma, #vdg, ngraham, zzag Subscribers: ngraham, davidedmundson, zzag, #vdg, #plasma, kwin, #kwin Tags: #kwin Maniphest Tasks: T10273 Differential Revision: https://phabricator.kde.org/D23615 --- kcmkwin/kwinoptions/actions.ui | 1122 ++++++++-------- kcmkwin/kwinoptions/advanced.ui | 394 +++--- kcmkwin/kwinoptions/focus.ui | 774 ++++------- kcmkwin/kwinoptions/kwinactions.desktop | 4 +- kcmkwin/kwinoptions/kwinadvanced.desktop | 6 +- kcmkwin/kwinoptions/kwinfocus.desktop | 6 +- kcmkwin/kwinoptions/kwinmoving.desktop | 4 +- kcmkwin/kwinoptions/kwinoptions.desktop | 2 +- kcmkwin/kwinoptions/main.cpp | 8 +- kcmkwin/kwinoptions/mouse.cpp | 2 +- kcmkwin/kwinoptions/mouse.ui | 1502 ++++++++++------------ kcmkwin/kwinoptions/moving.ui | 370 ++---- kcmkwin/kwinoptions/windows.cpp | 41 +- 13 files changed, 1766 insertions(+), 2469 deletions(-) diff --git a/kcmkwin/kwinoptions/actions.ui b/kcmkwin/kwinoptions/actions.ui index 928381bbfe..5520483807 100644 --- a/kcmkwin/kwinoptions/actions.ui +++ b/kcmkwin/kwinoptions/actions.ui @@ -6,631 +6,526 @@ 0 0 - 509 - 309 + 600 + 500 - + - - - Qt::Horizontal + + + Inactive Inner Window Actions - - - 40 - 20 - - - - - - - - - - M&ouse wheel: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coAllW - - - - - - - - 0 - 0 - - - - In this row you can customize middle click behavior when clicking into the titlebar or the frame. - - + + + Qt::AlignHCenter|Qt::AlignTop + + + - Move + &Left click: - - - - Activate, Raise & Move + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - Toggle Raise & Lower + + coWin1 - - - - Resize + + + + + + In this row you can customize left click behavior when clicking into an inactive inner window ('inner' means: not titlebar, not frame). - - - - Raise - - - - - Lower - - - - - Minimize - - - - - Decrease Opacity - - - - - Increase Opacity - - - - - Nothing - - - - - - - - Ri&ght button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coAll3 - - - - - - - &Wheel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coWinWheel - - - - - - - Middle b&utton: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coAll2 - - - - - - - - 0 - 0 - - - - In this row you can customize right click behavior when clicking into the titlebar or the frame. - - - - Move - - - - - Activate, Raise & Move - - - - - Toggle Raise & Lower - - - - - Resize - - - - - Raise - - - - - Lower - - - - - Minimize - - - - - Decrease Opacity - - - - - Increase Opacity - - - - - Nothing - - - - - - - - &Left button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coWin1 - - - - - - - - 75 - true - - - - Inner Window, Titlebar & Frame - - - - - - - - 0 - 0 - - - - In this row you can customize middle click behavior when clicking into an inactive inner window ('inner' means: not titlebar, not frame). - - - - Activate, Raise & Pass Click - - - - - Activate & Pass Click - - - - - Activate - - - - - Activate & Raise - - - - - - - - &Right button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coWin3 - - - - - - - - 0 - 0 - - - - In this row you can customize behavior when scrolling into an inactive inner window ('inner' means: not titlebar, not frame). - - - - Scroll - - - - - Activate & Scroll - - - - - Activate, Raise & Scroll - - - - - - - - - 0 - 0 - - - - In this row you can customize left click behavior when clicking into the titlebar or the frame. - - - - Move - - - - - Activate, Raise & Move - - - - - Toggle Raise & Lower - - - - - Resize - - - - - Raise - - - - - Lower - - - - - Minimize - - - - - Decrease Opacity - - - - - Increase Opacity - - - - - Nothing - - - - - - - - - 0 - 0 - - - - Here you can customize KDE's behavior when scrolling with the mouse wheel in a window while pressing the modifier key. - - - - Raise/Lower - - - - - Shade/Unshade - - - - - Maximize/Restore - - - - - Keep Above/Below - - - - - Move to Previous/Next Desktop - - - - - Change Opacity - - - - - Switch to Window Tab to the Left/Right - - - - - Nothing - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - In this row you can customize left click behavior when clicking into an inactive inner window ('inner' means: not titlebar, not frame). - - - - Activate, Raise & Pass Click - - - - - Activate & Pass Click - - - - - Activate - - - - - Activate & Raise - - - - - - - - - 0 - 0 - - - - In this row you can customize right click behavior when clicking into an inactive inner window ('inner' means: not titlebar, not frame). - - - - Activate, Raise & Pass Click - - - - - Activate & Pass Click - - - - - Activate - - - - - Activate & Raise - - - - - - - - M&iddle button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coWin2 - - - - - - - - 75 - true - - - - Inactive Inner Window - - - - - - - Left &button - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coAll1 - - - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - Modifier &key: - - - coAllKey - - - - - - - Here you select whether holding the Meta key or Alt key will allow you to perform the following actions. - - - - Meta - - - - - Alt - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - + - + + Activate, raise and pass click - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - + + + + Activate and pass click + + + + + Activate + + + + + Activate and raise + + + + + + + + &Middle click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coWin2 + + + + + + + In this row you can customize middle click behavior when clicking into an inactive inner window ('inner' means: not titlebar, not frame). + + + + Activate, raise and pass click + + + + + Activate and pass click + + + + + Activate + + + + + Activate and raise + + + + + + + + &Right click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coWin3 + + + + + + + In this row you can customize right click behavior when clicking into an inactive inner window ('inner' means: not titlebar, not frame). + + + + Activate, raise and pass click + + + + + Activate and pass click + + + + + Activate + + + + + Activate and raise + + + + + + + + Mouse &wheel: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coWinWheel + + + + + + + In this row you can customize behavior when scrolling into an inactive inner window ('inner' means: not titlebar, not frame). + + + + Scroll + + + + + Activate and scroll + + + + + Activate, raise and scroll + + + + + + - + + + Inner Window, Titlebar and Frame Actions + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + Mo&difier key: + + + coAllKey + + + + + + + Here you select whether holding the Meta key or Alt key will allow you to perform the following actions. + + + + Alt + + + + + Meta + + + + + + + + + + + 0 + 0 + + + + + 24 + 0 + + + + + + + + Qt::AlignCenter + + + + + + + + + L&eft click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coAll1 + + + + + + + In this row you can customize left click behavior when clicking into the titlebar or the frame. + + + + Move + + + + + Activate, raise and move + + + + + Toggle raise and lower + + + + + Resize + + + + + Raise + + + + + Lower + + + + + Minimize + + + + + Decrease opacity + + + + + Increase opacity + + + + + Do nothing + + + + + + + + Middle &click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coAll2 + + + + + + + In this row you can customize middle click behavior when clicking into the titlebar or the frame. + + + + Move + + + + + Activate, raise and move + + + + + Toggle raise and lower + + + + + Resize + + + + + Raise + + + + + Lower + + + + + Minimize + + + + + Decrease opacity + + + + + Increase opacity + + + + + Do nothing + + + + + + + + Right clic&k: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coAll3 + + + + + + + In this row you can customize right click behavior when clicking into the titlebar or the frame. + + + + Move + + + + + Activate, raise and move + + + + + Toggle raise and lower + + + + + Resize + + + + + Raise + + + + + Lower + + + + + Minimize + + + + + Decrease opacity + + + + + Increase opacity + + + + + Do nothing + + + + + + + + Mo&use wheel: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coAllW + + + + + + + Here you can customize KDE's behavior when scrolling with the mouse wheel in a window while pressing the modifier key. + + + + Raise/lower + + + + + Shade/unshade + + + + + Maximize/restore + + + + + Keep above/below + + + + + Move to previous/next desktop + + + + + Change opacity + + + + + Switch to window tab to the left/right + + + + + Do nothing + + + + + + + + + + + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 0 + 0 @@ -644,17 +539,6 @@
kcombobox.h
- - coWin1 - coWin2 - coWin3 - coWinWheel - coAllKey - coAll1 - coAll2 - coAll3 - coAllW - diff --git a/kcmkwin/kwinoptions/advanced.ui b/kcmkwin/kwinoptions/advanced.ui index 26d8cce3d5..539f9830ef 100644 --- a/kcmkwin/kwinoptions/advanced.ui +++ b/kcmkwin/kwinoptions/advanced.ui @@ -6,253 +6,167 @@ 0 0 - 504 - 387 + 600 + 500 - - - - - Qt::Horizontal + + + Qt::AlignHCenter|Qt::AlignTop + + + + + Window &unshading: - - - 40 - 20 - + + shadeHoverOn - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Window Tabbing - - - true - - - - - - When turned on hide all tabs that are not active from the taskbar. - - - Hide inactive window tabs from the taskbar - - - - - - - When turned on attempt to automatically detect when a newly opened window is related to an existing one and place them in the same window group. - - - Automatically group similar windows - - - - - - - When turned on immediately switch to any new window tabs that were automatically added to the current group. - - - Switch to automatically grouped windows immediately - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - &Placement: - - - true - - - - - - - 0 - 0 - - - - The placement policy determines where a new window will appear on the desktop.<br><ul> -<li><em>Smart</em> will try to achieve a minimum overlap of windows</li> -<li><em>Maximizing</em> will try to maximize every window to fill the whole screen. It might be useful to selectively affect placement of some windows using the window-specific settings.</li> -<li><em>Cascade</em> will cascade the windows</li> -<li><em>Random</em> will use a random position</li> -<li><em>Centered</em> will place the window centered</li> -<li><em>Zero-Cornered</em> will place the window in the top-left corner</li> -<li><em>Under Mouse</em> will place the window under the pointer</li> -</ul> - - - - Smart - - - - - Maximizing - - - - - Cascade - - - - - Random - - - - - Centered - - - - - Zero-Cornered - - - - - Under Mouse - - - - - - - - Shading + + + + + <html><head/><body><p>If this option is enabled, a shaded window will unshade automatically when the mouse pointer has been over the titlebar for some time.</p></body></html> + + + On titlebar hover after: + + + + + + + Sets the time in milliseconds before the window unshades when the mouse pointer goes over the shaded window. + + + ms + + + 0 + + + 3000 + + + 100 + + + 250 + + + + + + + + + Window &placement: - - true + + placementCombo + + + + + + + <html><head/><body><p>The placement policy determines where a new window will appear on the desktop.</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Smart</span> will try to achieve a minimum overlap of windows</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Maximizing</span> will try to maximize every window to fill the whole screen. It might be useful to selectively affect placement of some windows using the window-specific settings.</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Cascade</span> will cascade the windows</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Random</span> will use a random position</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Centered</span> will place the window centered</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Zero-cornered</span> will place the window in the top-left corner</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Under mouse</span> will place the window under the pointer</li></ul></body></html> + + + + Smart + + + + + Maximizing + + + + + Cascade + + + + + Random + + + + + Centered + + + + + Zero-cornered + + + + + Under mouse + + + + + + + + Window tabbing: - - - - - Dela&y: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - shadeHover - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 24 - 20 - - - - - - - - If Shade Hover is enabled, a shaded window will un-shade automatically when the mouse pointer has been over the title bar for some time. - - - &Enable hover - - - - - - - Sets the time in milliseconds before the window unshades when the mouse pointer goes over the shaded window. - - - 500 - - - 0 - - - 3000 - - - 100 - - - ms - - - - - - - Special Windows + + + When turned on immediately switch to any new window tabs that were automatically added to the current group. - - true + + &Switch to automatically grouped windows immediately + + + + + + + When turned on hide all tabs that are not active from the taskbar. + + + &Hide inactive window tabs from the taskbar + + + + + + + &Special windows: + + + hideUtilityWindowsForInactive + + + + + + + When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be hidden and will be shown only when the application becomes active. Note that applications have to mark the windows with the proper window type for this feature to work. + + + Hide utility windows for inactive applications + + + + + + + When turned on attempt to automatically detect when a newly opened window is related to an existing one and place them in the same window group. + + + &Group similar windows automatically - - - - - When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be hidden and will be shown only when the application becomes active. Note that applications have to mark the windows with the proper window type for this feature to work. - - - Hide utility windows for inactive applications - - - - @@ -263,21 +177,7 @@ QComboBox
kcombobox.h
- - QSpinBox - QWidget -
knuminput.h
-
- - shadeHoverOn - shadeHover - inactiveTabsSkipTaskbar - autogroupSimilarWindows - autogroupInForeground - placementCombo - hideUtilityWindowsForInactive - diff --git a/kcmkwin/kwinoptions/focus.ui b/kcmkwin/kwinoptions/focus.ui index 5d39c1ee4e..735f81c057 100644 --- a/kcmkwin/kwinoptions/focus.ui +++ b/kcmkwin/kwinoptions/focus.ui @@ -6,502 +6,239 @@ 0 0 - 656 - 540 + 600 + 500 - - - - - Qt::Horizontal + + + + + Qt::AlignHCenter|Qt::AlignTop - - - 40 - 20 - - - - - - - - Activating windows - - - true - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 0 - - - - - - - <b>Click To Focus</b><br> -A window becomes active when you click into it.<br><br> -This behaviour is common on other operating systems and<br> -likely what you want. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - - - - - - - - <b>Click To Focus - Mouse Precedence</b><br> -This is mostly the same as <i>Click To Focus</i><br><br> -If an active window has to be chosen by the system<br> -(eg. because the currently active one was closed) <br> -the window under the mouse is the preferred candidate.<br><br> -Unusual, but possible variant of <i>Click To Focus</i>. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - - - - - - - - <b>Focus Follows Mouse</b><br> -Moving the mouse onto a window will activate it.<br><br> -Eg. windows randomly appearing under the mouse will not gain the focus.<br> -Focus stealing prevention takes place as usual.<br><br> -Think as <i>Click To Focus</i> just without having to actually click. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - - - - - - - - <b>Focus Follows Mouse - Mouse Precedence</b><br> -This is mostly the same as <i>Focus Follows Mouse</i><br><br> -If an active window has to be chosen by the system<br> -(eg. because the currently active one was closed) <br> -the window under the mouse is the preferred candidate.<br><br> -Choose this, if you want a hover controlled focus. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - - - - - - - - <b>Focus Under Mouse</b><br> -The focus always remains on the window under the mouse.<br><br> - -Notice:<br> -<b>Focus stealing prevention</b> and the <b>tabbox ("Alt+Tab")</b><br> -contradict the policy and <b>will not work</b>.<br><br> -You very likely want to use<br> -<i>Focus Follows Mouse - Mouse Precedence</i> instead! - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - - - - - - - - <b>Focus Strictly Under Mouse</b><br> -The focus is always on the window under the mouse - in doubt nowhere -<br> -very much like the focus behaviour in an unmanaged legacy X11 environment.<br><br> - -Notice:<br> -<b>Focus stealing prevention</b> and the <b>tabbox ("Alt+Tab")</b><br> -contradict the policy and <b>will not work</b>.<br><br> -You very likely want to use<br> -<i>Focus Follows Mouse - Mouse Precedence</i> instead! - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - &Delay focus by - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - delayFocus - - - - - - - - 0 - 0 - - - - This is the delay after which the window the mouse pointer is over will automatically receive focus. - - - ms - - - 0 - - - 3000 - - - 100 - - - 99 - - - - - - - - - - - Focus &stealing prevention - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - focusStealing - - - - - - - - 0 - 0 - - - - <p>This option specifies how much KWin will try to prevent unwanted focus stealing caused by unexpected activation of new windows. (Note: This feature does not work with the Focus Under Mouse or Focus Strictly Under Mouse focus policies.) -<ul> -<li><em>None:</em> Prevention is turned off and new windows always become activated.</li> -<li><em>Low:</em> Prevention is enabled; when some window does not have support for the underlying mechanism and KWin cannot reliably decide whether to activate the window or not, it will be activated. This setting may have both worse and better results than the medium level, depending on the applications.</li> -<li><em>Medium:</em> Prevention is enabled.</li> -<li><em>High:</em> New windows get activated only if no window is currently active or if they belong to the currently active application. This setting is probably not really usable when not using mouse focus policy.</li> -<li><em>Extreme:</em> All windows must be explicitly activated by the user.</li> -</ul></p> -<p>Windows that are prevented from stealing focus are marked as demanding attention, which by default means their taskbar entry will be highlighted. This can be changed in the Notifications control module.</p> - - - - None - - - - - Low - - - - - Medium - - - - - High - - - - - Extreme - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - - 0 - 0 - - - - - 75 - true - - - - Policy - - - - - - - - 0 - 0 - - - - Click - - - - - - - 5 - - - 1 - - - Qt::Horizontal - - - QSlider::NoTicks - - - 0 - - - - - - - - 0 - 0 - - - - Hover - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Raising windows - - - true - - - - - - When this option is enabled, a window in the background will automatically come to the front when the mouse pointer has been over it for some time. - + + + + Window &activation policy: + + + windowFocusPolicyCombo + + + + + + + With this option you can specify how and when windows will be focused. + + - &Raise on hover, delayed by - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - This is the delay after which the window that the mouse pointer is over will automatically come to the front. - - - ms - - - 0 - - - 3000 - - - 100 - - - 99 - - - - - - - When this option is enabled, the active window will be brought to the front when you click somewhere into the window contents. To change it for inactive windows, you need to change the settings in the Actions tab. + Click to focus + + - C&lick raises active window + Click to focus (mouse precedence) - - - - + + + + Focus follows mouse + + + + + Focus follows mouse (mouse precedence) + + + + + Focus under mouse + + + + + Focus strictly under mouse + + + +
+ + + + &Delay focus by: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + delayFocus + + + + + + + This is the delay after which the window the mouse pointer is over will automatically receive focus. + + + ms + + + 0 + + + 3000 + + + 100 + + + + + + + Focus &stealing prevention: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + focusStealing + + + + + + + <html><head/><body><p>This option specifies how much KWin will try to prevent unwanted focus stealing caused by unexpected activation of new windows. (Note: This feature does not work with the <span style=" font-style:italic;">Focus under mouse</span> or <span style=" font-style:italic;">Focus strictly under mouse</span> focus policies.) </p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">None:</span> Prevention is turned off and new windows always become activated.</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Low:</span> Prevention is enabled; when some window does not have support for the underlying mechanism and KWin cannot reliably decide whether to activate the window or not, it will be activated. This setting may have both worse and better results than the medium level, depending on the applications.</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Medium:</span> Prevention is enabled.</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">High:</span> New windows get activated only if no window is currently active or if they belong to the currently active application. This setting is probably not really usable when not using mouse focus policy.</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Extreme:</span> All windows must be explicitly activated by the user.</li></ul><p>Windows that are prevented from stealing focus are marked as demanding attention, which by default means their taskbar entry will be highlighted. This can be changed in the Notifications control module.</p></body></html> + + + + None + + + + + Low + + + + + Medium + + + + + High + + + + + Extreme + + + + + + + + Raising windows: + + + + + + + When this option is enabled, the active window will be brought to the front when you click somewhere into the window contents. To change it for inactive windows, you need to change the settings in the Actions tab. + + + &Click raises active window + + + + + + + + + When this option is enabled, a window in the background will automatically come to the front when the mouse pointer has been over it for some time. + + + &Raise on hover, delayed by: + + + + + + + This is the delay after which the window that the mouse pointer is over will automatically come to the front. + + + ms + + + 0 + + + 3000 + + + 100 + + + + + + + + + Multiscreen behavior: + + + + + + + When this option is enabled, the active Xinerama screen (where new windows appear, for example) is the screen containing the mouse pointer. When disabled, the active Xinerama screen is the screen containing the focused window. By default this option is disabled for Click to focus and enabled for other focus policies. + + + Active screen follows &mouse + + + + + + + When this option is enabled, focus operations are limited only to the active Xinerama screen + + + &Separate screen focus + + + + + + + + 280 + 0 + + + + Window activation policy description + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + - + Qt::Vertical @@ -509,43 +246,11 @@ You very likely want to use<br> 20 - 192 + 40 - - - - Multiscreen behaviour - - - true - - - - - - When this option is enabled, focus operations are limited only to the active Xinerama screen - - - S&eparate screen focus - - - - - - - When this option is enabled, the active Xinerama screen (where new windows appear, for example) is the screen containing the mouse pointer. When disabled, the active Xinerama screen is the screen containing the focused window. By default this option is disabled for Click to focus and enabled for other focus policies. - - - Active screen follows &mouse - - - - - - @@ -555,31 +260,6 @@ You very likely want to use<br>
kcombobox.h
- - focusStealing - autoRaiseOn - autoRaise - delayFocus - separateScreenFocus - activeMouseScreen - - - - windowFocusPolicy - valueChanged(int) - stackedWidget - setCurrentIndex(int) - - - 244 - 38 - - - 444 - 84 - - - - + diff --git a/kcmkwin/kwinoptions/kwinactions.desktop b/kcmkwin/kwinoptions/kwinactions.desktop index ed73e9fba1..4abfd9f0a2 100644 --- a/kcmkwin/kwinoptions/kwinactions.desktop +++ b/kcmkwin/kwinoptions/kwinactions.desktop @@ -9,7 +9,7 @@ Icon=preferences-system-windows-actions X-KDE-Library=kcm_kwinoptions X-KDE-PluginKeyword=kwinactions -Name=Actions +Name=Window Actions Name[af]=Aksies Name[ar]=إجراءات Name[be]=Дзеянні @@ -99,7 +99,7 @@ Name[x-test]=xxActionsxx Name[zh_CN]=操作 Name[zh_TW]=動作 -Comment=Mouse Actions on Windows +Comment=Configure mouse actions for windows and titlebars Comment[bs]=Akcioje miša na prozorima Comment[ca]=Accions del ratolí en les finestres Comment[ca@valencia]=Accions del ratolí en les finestres diff --git a/kcmkwin/kwinoptions/kwinadvanced.desktop b/kcmkwin/kwinoptions/kwinadvanced.desktop index 797424250f..9749798baf 100644 --- a/kcmkwin/kwinoptions/kwinadvanced.desktop +++ b/kcmkwin/kwinoptions/kwinadvanced.desktop @@ -8,7 +8,7 @@ X-DocPath=kcontrol/windowbehaviour/index.html#action-advanced X-KDE-Library=kcm_kwinoptions X-KDE-PluginKeyword=kwinadvanced -Name=Advanced +Name=Advanced Window Behavior Name[af]=Gevorderd Name[ar]=متقدم Name[be]=Асаблівы @@ -98,7 +98,7 @@ Name[x-test]=xxAdvancedxx Name[zh_CN]=高级 Name[zh_TW]=進階 -Comment=Advanced Window Management Features +Comment=Configure advanced window management options Comment[bs]=Napredne mogućnosti upravljanja prozoeima Comment[ca]=Característiques avançades per a la gestió de les finestres Comment[ca@valencia]=Característiques avançades per a la gestió de les finestres @@ -143,7 +143,7 @@ Comment[x-test]=xxAdvanced Window Management Featuresxx Comment[zh_CN]=高级窗口管理特性 Comment[zh_TW]=進階視窗管理功能 -X-KDE-Keywords=shading,border,hover,active borders,tiling,tabs,tabbing,window tabbing,window grouping,window tiling,window placement,placement of windows,window advanced behavior +X-KDE-Keywords=unshade,unshading,shade,shading,border,hover,active borders,tiling,tabs,tabbing,window,window tabbing,window grouping,window tiling,placement,window placement,placement of windows,window advanced behavior X-KDE-Keywords[bs]=sjenčanje, granične, lebdjenje, aktivne granice, popločavanje, Kartice, tabovanje, prozorno tabovanje, grupiranje prozora, pločica, prozorna pločica, plasman przora, plasman prozorâ, napredo ponašanje prozora X-KDE-Keywords[ca]=ombra,vora,passar per sobre,vores actives,mosaic,pestanyes,pestanyes de finestra,agrupació de les finestres,mosaic de les finestres,col·locació de les finestres,comportament avançat de les finestres X-KDE-Keywords[ca@valencia]=ombra,vora,passar per damunt,vores actives,mosaic,pestanyes,pestanyes de finestra,agrupació de les finestres,mosaic de les finestres,col·locació de les finestres,comportament avançat de les finestres diff --git a/kcmkwin/kwinoptions/kwinfocus.desktop b/kcmkwin/kwinoptions/kwinfocus.desktop index a7a480cbb6..8586574dba 100644 --- a/kcmkwin/kwinoptions/kwinfocus.desktop +++ b/kcmkwin/kwinoptions/kwinfocus.desktop @@ -8,7 +8,7 @@ X-DocPath=kcontrol/windowbehaviour/index.html#action-focus X-KDE-Library=kcm_kwinoptions X-KDE-PluginKeyword=kwinfocus -Name=Focus +Name=Window Focus Behavior Name[af]=Fokus Name[ar]=التركيز Name[be]=Фокус @@ -96,7 +96,7 @@ Name[x-test]=xxFocusxx Name[zh_CN]=对焦 Name[zh_TW]=焦點 -Comment=Active Window Policy +Comment=Configure window activation policy Comment[bs]=Pravila aktivnih prozora Comment[ca]=Política de la finestra activa Comment[ca@valencia]=Política de la finestra activa @@ -139,7 +139,7 @@ Comment[x-test]=xxActive Window Policyxx Comment[zh_CN]=活动窗口策略 Comment[zh_TW]=作用中視窗政策 -X-KDE-Keywords=focus,placement,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,focus follows mouse,focus prevention,focus stealing,focus policy,window focus behavior,window screen behavior +X-KDE-Keywords=focus,auto raise,raise,click raise,keyboard,CDE,alt-tab,all desktop,focus follows mouse,focus prevention,focus stealing,focus policy,window focus behavior,window screen behavior X-KDE-Keywords[bs]=fokus, smještaj, automatski rast, rast, kliknite na rast, tastatura, CDE, Alt-Tab, cijeli desktop, fokus slijedi miša, fokus prevenciju, usredotoči krade, fokus politike, fokus prozora ponašanje, prozor zaslon ponašanje X-KDE-Keywords[ca]=focus,col·locació,elevació automàtica,elevació,elevació en clic,teclat,CDE,alt-tab,tots els escriptoris,focus segueix el ratolí,prevenció del focus,robatori del focus,política del focus,comportament del focus de la finestra,comportament en pantalla de la finestra X-KDE-Keywords[ca@valencia]=focus,col·locació,elevació automàtica,elevació,elevació en clic,teclat,CDE,alt-tab,tots els escriptoris,focus segueix el ratolí,prevenció de focus,robatori de focus,política de focus,comportament del focus de la finestra,comportament en pantalla de la finestra diff --git a/kcmkwin/kwinoptions/kwinmoving.desktop b/kcmkwin/kwinoptions/kwinmoving.desktop index 9de7f43774..ea1af415ea 100644 --- a/kcmkwin/kwinoptions/kwinmoving.desktop +++ b/kcmkwin/kwinoptions/kwinmoving.desktop @@ -9,7 +9,7 @@ Icon=preferences-system-windows-move X-KDE-Library=kcm_kwinoptions X-KDE-PluginKeyword=kwinmoving -Name=Moving +Name=Window Movement Name[af]=Beweeg Name[ar]=التحريك Name[be]=Перамяшчэнне @@ -97,7 +97,7 @@ Name[x-test]=xxMovingxx Name[zh_CN]=移动中 Name[zh_TW]=移動 -Comment=Window Moving +Comment=Configure window movement options Comment[bs]=Kretanje prozora Comment[ca]=Moviment de les finestres Comment[ca@valencia]=Moviment de les finestres diff --git a/kcmkwin/kwinoptions/kwinoptions.desktop b/kcmkwin/kwinoptions/kwinoptions.desktop index b5da379e69..0c7830deba 100644 --- a/kcmkwin/kwinoptions/kwinoptions.desktop +++ b/kcmkwin/kwinoptions/kwinoptions.desktop @@ -100,7 +100,7 @@ Name[x-test]=xxWindow Behaviorxx Name[zh_CN]=窗口行为 Name[zh_TW]=視窗行為 -Comment=Window Actions and Behavior +Comment=Configure window actions and behavior Comment[bs]=Akcije i ponašanje prozora Comment[ca]=Accions i comportament de les finestres Comment[ca@valencia]=Accions i comportament de les finestres diff --git a/kcmkwin/kwinoptions/main.cpp b/kcmkwin/kwinoptions/main.cpp index 9c17976222..66c03124d5 100644 --- a/kcmkwin/kwinoptions/main.cpp +++ b/kcmkwin/kwinoptions/main.cpp @@ -80,22 +80,22 @@ KWinOptions::KWinOptions(QWidget *parent, const QVariantList &) mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this); mTitleBarActions->setObjectName(QLatin1String("KWin TitleBar Actions")); - tab->addTab(mTitleBarActions, i18n("&Titlebar Actions")); + tab->addTab(mTitleBarActions, i18n("Titlebar A&ctions")); connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); mWindowActions = new KWindowActionsConfig(false, mConfig, this); mWindowActions->setObjectName(QLatin1String("KWin Window Actions")); - tab->addTab(mWindowActions, i18n("Window Actio&ns")); + tab->addTab(mWindowActions, i18n("W&indow Actions")); connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); mMoving = new KMovingConfig(false, mConfig, this); mMoving->setObjectName(QLatin1String("KWin Moving")); - tab->addTab(mMoving, i18n("&Moving")); + tab->addTab(mMoving, i18n("Mo&vement")); connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); mAdvanced = new KAdvancedConfig(false, mConfig, this); mAdvanced->setObjectName(QLatin1String("KWin Advanced")); - tab->addTab(mAdvanced, i18n("Ad&vanced")); + tab->addTab(mAdvanced, i18n("Adva&nced")); connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); KAboutData *about = diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp index 3485b48085..8f48c14d78 100644 --- a/kcmkwin/kwinoptions/mouse.cpp +++ b/kcmkwin/kwinoptions/mouse.cpp @@ -253,8 +253,8 @@ const char* const tbl_WinWheel[] = { }; const char* const tbl_AllKey[] = { - "Meta", "Alt", + "Meta", "" }; diff --git a/kcmkwin/kwinoptions/mouse.ui b/kcmkwin/kwinoptions/mouse.ui index a2f1abab86..7348b9182b 100644 --- a/kcmkwin/kwinoptions/mouse.ui +++ b/kcmkwin/kwinoptions/mouse.ui @@ -6,808 +6,717 @@ 0 0 - 696 - 416 + 600 + 500 - + - + + + Titlebar Actions + + + + Qt::AlignHCenter|Qt::AlignTop + + + + + &Double-click: + + + coTiDbl + + + + + + + Behavior on <em>double</em> click into the titlebar. + + + + Maximize + + + + + Maximize (vertical only) + + + + + Maximize (horizontal only) + + + + + Minimize + + + + + Shade + + + + + Lower + + + + + Close + + + + + Show on all desktops + + + + + Do nothing + + + + + + + + Mouse &wheel: + + + coTiAct4 + + + + + + + Behavior on <em>mouse wheel</em> scroll over the titlebar. + + + + Raise/lower + + + + + Shade/unshade + + + + + Maximize/restore + + + + + Keep above/below + + + + + Move to previous/next desktop + + + + + Change opacity + + + + + Switch to window tab to the left/right + + + + + Do nothing + + + + + + + + + + + Titlebar and Frame Actions + + + Qt::AlignCenter + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + Active + + + Qt::AlignCenter + + + + + + + &Left click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coTiAct1 + + + + + + + Inactive + + + Qt::AlignCenter + + + + + + + &Middle click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coTiAct2 + + + + + + + &Right click: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + coTiAct3 + + + + + + + + 0 + 0 + + + + Behavior on <em>left</em> click into the titlebar or frame of an <em>active</em> window. + + + + Raise + + + + + Lower + + + + + Toggle raise and lower + + + + + Minimize + + + + + Shade + + + + + Close + + + + + Show actions menu + + + + + Start window tab drag + + + + + Do nothing + + + + + + + + Behavior on <em>left</em> click into the titlebar or frame of an <em>inactive</em> window. + + + + Activate and raise + + + + + Activate and lower + + + + + Activate + + + + + Raise + + + + + Lower + + + + + Toggle raise and lower + + + + + Minimize + + + + + Shade + + + + + Close + + + + + Show actions menu + + + + + Start window tab drag + + + + + Do nothing + + + + + + + + + 0 + 0 + + + + Behavior on <em>left</em> click into the titlebar or frame of an <em>active</em> window. + + + + Raise + + + + + Lower + + + + + Toggle raise and lower + + + + + Minimize + + + + + Shade + + + + + Close + + + + + Show actions menu + + + + + Start window tab drag + + + + + Do nothing + + + + + + + + Behavior on <em>left</em> click into the titlebar or frame of an <em>inactive</em> window. + + + + Activate and raise + + + + + Activate and lower + + + + + Activate + + + + + Raise + + + + + Lower + + + + + Toggle raise and lower + + + + + Minimize + + + + + Shade + + + + + Close + + + + + Show actions menu + + + + + Start window tab drag + + + + + Do nothing + + + + + + + + + 0 + 0 + + + + Behavior on <em>left</em> click into the titlebar or frame of an <em>active</em> window. + + + + Raise + + + + + Lower + + + + + Toggle raise and lower + + + + + Minimize + + + + + Shade + + + + + Close + + + + + Show actions menu + + + + + Start window tab drag + + + + + Do nothing + + + + + + + + Behavior on <em>left</em> click into the titlebar or frame of an <em>inactive</em> window. + + + + Activate and raise + + + + + Activate and lower + + + + + Activate + + + + + Raise + + + + + Lower + + + + + Toggle raise and lower + + + + + Minimize + + + + + Shade + + + + + Close + + + + + Show actions menu + + + + + Start window tab drag + + + + + Do nothing + + + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + + Maximize Button Actions + + + + Qt::AlignHCenter|Qt::AlignTop + + + + + Behavior on <em>left</em> click onto the maximize button. + + + L&eft click: + + + leftClickMaximizeButton + + + + + + + + 0 + 0 + + + + Behavior on <em>left</em> click onto the maximize button. + + + + + + + Behavior on <em>middle</em> click onto the maximize button. + + + Middle c&lick: + + + middleClickMaximizeButton + + + + + + + + 0 + 0 + + + + Behavior on <em>middle</em> click onto the maximize button. + + + + + + + Behavior on <em>right</em> click onto the maximize button. + + + Right clic&k: + + + rightClickMaximizeButton + + + + + + + + 0 + 0 + + + + Behavior on <em>right</em> click onto the maximize button. + + + + + + + + - Qt::Horizontal + Qt::Vertical - 40 - 20 - - - - - - - - - - &Double-click: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coTiDbl - - - - - - - - 0 - 0 - - - - Behavior on <em>double</em> click into the titlebar. - - - - Maximize - - - - - Maximize (vertical only) - - - - - Maximize (horizontal only) - - - - - Minimize - - - - - Shade - - - - - Lower - - - - - Close - - - - - On All Desktops - - - - - Nothing - - - - - - - - Wheel event: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - coTiAct4 - - - - - - - - 0 - 0 - - - - Handle mouse wheel events - - - - Raise/Lower - - - - - Shade/Unshade - - - - - Maximize/Restore - - - - - Keep Above/Below - - - - - Move to Previous/Next Desktop - - - - - Change Opacity - - - - - Switch to Window Tab to the Left/Right - - - - - Nothing - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - In this column you can customize mouse clicks into the titlebar or the frame of an active window. - - - Active - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - In this column you can customize mouse clicks into the titlebar or the frame of an inactive window. - - - Inactive - - - Qt::AlignCenter - - - - - - - In this row you can customize left click behavior when clicking into the titlebar or the frame. - - - Left button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - Behavior on <em>left</em> click into the titlebar or frame of an <em>active</em> window. - - - - Raise - - - - - Lower - - - - - Toggle Raise & Lower - - - - - Minimize - - - - - Shade - - - - - Close - - - - - Operations Menu - - - - - Start Window Tab Drag - - - - - Nothing - - - - - - - - - 0 - 0 - - - - Behavior on <em>left</em> click into the titlebar or frame of an <em>inactive</em> window. - - - - Activate & Raise - - - - - Activate & Lower - - - - - Activate - - - - - Raise - - - - - Lower - - - - - Toggle Raise & Lower - - - - - Minimize - - - - - Shade - - - - - Close - - - - - Operations Menu - - - - - Start Window Tab Drag - - - - - Nothing - - - - - - - - In this row you can customize middle click behavior when clicking into the titlebar or the frame. - - - Middle button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window. - - - - Raise - - - - - Lower - - - - - Toggle Raise & Lower - - - - - Minimize - - - - - Shade - - - - - Close - - - - - Operations Menu - - - - - Start Window Tab Drag - - - - - Nothing - - - - - - - - - 0 - 0 - - - - Behavior on <em>left</em> click into the titlebar or frame of an <em>inactive</em> window. - - - - Activate & Raise - - - - - Activate & Lower - - - - - Activate - - - - - Raise - - - - - Lower - - - - - Toggle Raise & Lower - - - - - Minimize - - - - - Shade - - - - - Close - - - - - Operations Menu - - - - - Start Window Tab Drag - - - - - Nothing - - - - - - - - In this row you can customize right click behavior when clicking into the titlebar or the frame. - - - Right button: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - Behavior on <em>right</em> click into the titlebar or frame of an <em>active</em> window. - - - - Raise - - - - - Lower - - - - - Toggle Raise & Lower - - - - - Minimize - - - - - Shade - - - - - Close - - - - - Operations Menu - - - - - Start Window Tab Drag - - - - - Nothing - - - - - - - - - 0 - 0 - - - - Behavior on <em>left</em> click into the titlebar or frame of an <em>inactive</em> window. - - - - Activate & Raise - - - - - Activate & Lower - - - - - Activate - - - - - Raise - - - - - Lower - - - - - Toggle Raise & Lower - - - - - Minimize - - - - - Shade - - - - - Close - - - - - Operations Menu - - - - - Start Window Tab Drag - - - - - Nothing - - - - - - - - Qt::Horizontal - - - - - - - - - Behavior on <em>left</em> click onto the maximize button. - - - Left button: - - - Qt::AlignCenter - - - leftClickMaximizeButton - - - - - - - Behavior on <em>middle</em> click onto the maximize button. - - - Middle button: - - - Qt::AlignCenter - - - middleClickMaximizeButton - - - - - - - Behavior on <em>right</em> click onto the maximize button. - - - Right button: - - - Qt::AlignCenter - - - rightClickMaximizeButton - - - - - - - - 0 - 0 - - - - Behavior on <em>left</em> click onto the maximize button. - - - - - - - - 0 - 0 - - - - Behavior on <em>middle</em> click onto the maximize button. - - - - - - - - 0 - 0 - - - - Behavior on <em>right</em> click onto the maximize button. - - - - - - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 75 - true - - - - Titlebar & Frame - - - - - - - - 75 - true - - - - Titlebar - - - - - - - - 75 - true - - - - Maximize Button - - - - - - - - - Qt::Horizontal - - - - 40 - 20 + 0 + 0 @@ -830,6 +739,9 @@ coTiInAct2 coTiAct3 coTiInAct3 + leftClickMaximizeButton + middleClickMaximizeButton + rightClickMaximizeButton diff --git a/kcmkwin/kwinoptions/moving.ui b/kcmkwin/kwinoptions/moving.ui index eb04689a0f..97f38a8bdb 100644 --- a/kcmkwin/kwinoptions/moving.ui +++ b/kcmkwin/kwinoptions/moving.ui @@ -6,259 +6,159 @@ 0 0 - 624 - 354 + 600 + 500 - + + + Qt::AlignHCenter|Qt::AlignTop + - - - Qt::Horizontal + + + Window &geometry: - - - 40 - 20 - + + geometryTipOn - + - - - - - Here you can set that windows will be only snapped if you try to overlap them, i.e. they will not be snapped if the windows comes only near another window or border. - - - Snap windows onl&y when overlapping - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Here you can set the snap zone for the screen center, i.e. the 'strength' of the magnetic field which will make windows snap to the center of the screen when moved near it. - - - 10 - - - 0 - - - 100 - - - pixel - - - no center snap zone - - - - - - - Qt::Horizontal - - - - 107 - 20 - - - - - - - - &Border snap zone: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - borderSnap - - - - - - - &Center snap zone: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - centerSnap - - - - - - - - 0 - 0 - - - - Here you can set the snap zone for windows, i.e. the 'strength' of the magnetic field which will make windows snap to each other when they are moved near another window. - - - 10 - - - 0 - - - 100 - - - pixel - - - no window snap zone - - - - - - - - 0 - 0 - - - - Here you can set the snap zone for screen borders, i.e. the 'strength' of the magnetic field which will make windows snap to the border when moved near it. - - - 10 - - - 0 - - - 100 - - - pixel - - - no border snap zone - - - - - - - Enable this option if you want a window's geometry to be displayed while it is being moved or resized. The window position relative to the top-left corner of the screen is displayed together with its size. - - - Display window &geometry when moving or resizing - - - - - - - &Window snap zone: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - windowSnap - - - - - - - Qt::Horizontal - - - - 90 - 20 - - - - - - - - Qt::Horizontal - - - - - - - - 75 - true - - - - Windows - - - - - - - - 75 - true - - - - Snap Zones - - - - + + + Enable this option if you want a window's geometry to be displayed while it is being moved or resized. The window position relative to the top-left corner of the screen is displayed together with its size. + + + Display when moving or resizing + + - - - - Qt::Horizontal + + + + Screen &edge snap zone: - - - 40 - 20 - + + borderSnap - + + + + + + Here you can set the snap zone for screen edges, i.e. the 'strength' of the magnetic field which will make windows snap to the border when moved near it. + + + None + + + px + + + 0 + + + 100 + + + 10 + + + + + + + Here you can set the snap zone for windows, i.e. the 'strength' of the magnetic field which will make windows snap to each other when they are moved near another window. + + + None + + + px + + + 0 + + + 100 + + + 10 + + + + + + + Here you can set the snap zone for the screen center, i.e. the 'strength' of the magnetic field which will make windows snap to the center of the screen when moved near it. + + + None + + + px + + + 0 + + + 100 + + + + + + + Here you can set that windows will be only snapped if you try to overlap them, i.e. they will not be snapped if the windows comes only near another window or border. + + + Only when overlapping + + + + + + + &Window snap zone: + + + windowSnap + + + + + + + &Center snap zone: + + + centerSnap + + + + + + + &Snap windows: + + + OverlapSnap + + - + Qt::Vertical + + QSizePolicy::Fixed + 20 - 112 + 2 diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index b1d640d5c4..1fe6a88daf 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -95,10 +95,10 @@ KFocusConfig::KFocusConfig(bool _standAlone, KConfig *_config, QWidget * parent) , m_ui(new KWinFocusConfigForm(this)) { connect(m_ui->focusStealing, SIGNAL(activated(int)), SLOT(changed())); - connect(m_ui->windowFocusPolicy, SIGNAL(valueChanged(int)), SLOT(changed())); - connect(m_ui->windowFocusPolicy, SIGNAL(valueChanged(int)), this, SLOT(focusPolicyChanged())); - connect(m_ui->windowFocusPolicy, SIGNAL(valueChanged(int)), this, SLOT(setDelayFocusEnabled())); - connect(m_ui->windowFocusPolicy, SIGNAL(valueChanged(int)), this, SLOT(updateActiveMouseScreen())); + connect(m_ui->windowFocusPolicyCombo, SIGNAL(currentIndexChanged(int)), SLOT(changed())); + connect(m_ui->windowFocusPolicyCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(focusPolicyChanged())); + connect(m_ui->windowFocusPolicyCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setDelayFocusEnabled())); + connect(m_ui->windowFocusPolicyCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateActiveMouseScreen())); connect(m_ui->autoRaiseOn, SIGNAL(clicked()), SLOT(changed())); connect(m_ui->autoRaiseOn, SIGNAL(toggled(bool)), SLOT(autoRaiseOnTog(bool))); connect(m_ui->clickRaiseOn, SIGNAL(clicked()), SLOT(changed())); @@ -115,13 +115,15 @@ KFocusConfig::KFocusConfig(bool _standAlone, KConfig *_config, QWidget * parent) void KFocusConfig::updateMultiScreen() { - m_ui->multiscreenBox->setVisible(QApplication::screens().count() > 1); + m_ui->multiscreenBehaviorLabel->setVisible(QApplication::screens().count() > 1); + m_ui->activeMouseScreen->setVisible(QApplication::screens().count() > 1); + m_ui->separateScreenFocus->setVisible(QApplication::screens().count() > 1); } int KFocusConfig::getFocus() { - int policy = m_ui->windowFocusPolicy->value(); + int policy = m_ui->windowFocusPolicyCombo->currentIndex(); if (policy == 1 || policy == 3) --policy; // fix the NextFocusPrefersMouse condition return policy; @@ -129,7 +131,7 @@ int KFocusConfig::getFocus() void KFocusConfig::setFocus(int foc) { - m_ui->windowFocusPolicy->setValue(foc); + m_ui->windowFocusPolicyCombo->setCurrentIndex(foc); // this will disable/hide the auto raise delay widget if focus==click focusPolicyChanged(); @@ -167,6 +169,27 @@ void KFocusConfig::setClickRaise(bool on) void KFocusConfig::focusPolicyChanged() { + switch (m_ui->windowFocusPolicyCombo->currentIndex()) { + case 0: + m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("

Click to focus: A window becomes active when you click into it. This behavior is common on other operating systems and likely what you want.

")); + break; + case 1: + m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("

Click to focus (mouse precedence): Mostly the same as Click to focus. If an active window has to be chosen by the system (eg. because the currently active one was closed) the window under the mouse is the preferred candidate. Unusual, but possible variant of Click to focus.

")); + break; + case 2: + m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("

Focus follows mouse: Moving the mouse onto a window will activate it. Eg. windows randomly appearing under the mouse will not gain the focus. Focus stealing prevention takes place as usual. Think as Click to focus just without having to actually click.

")); + break; + case 3: + m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("

This is mostly the same as Focus follows mouse. If an active window has to be chosen by the system (eg. because the currently active one was closed) the window under the mouse is the preferred candidate. Choose this, if you want a hover controlled focus.

")); + break; + case 4: + m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("

Focus under mouse: The focus always remains on the window under the mouse.
Warning: Focus stealing prevention and the tabbox ('Alt+Tab') contradict the activation policy and will not work. You very likely want to use Focus follows mouse (mouse precedence) instead!

")); + break; + case 5: + m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("

Focus strictly under mouse: The focus is always on the window under the mouse (in doubt nowhere) very much like the focus behavior in an unmanaged legacy X11 environment.
Warning: Focus stealing prevention and the tabbox ('Alt+Tab') contradict the activation policy and will not work. You very likely want to use Focus follows mouse (mouse precedence) instead!

")); + break; + } + int policyIndex = getFocus(); // the auto raise related widgets are: autoRaise @@ -289,7 +312,7 @@ void KFocusConfig::save(void) else cg.writeEntry(KWIN_FOCUS, "FocusFollowsMouse"); - cg.writeEntry("NextFocusPrefersMouse", v != m_ui->windowFocusPolicy->value()); + cg.writeEntry("NextFocusPrefersMouse", v != m_ui->windowFocusPolicyCombo->currentIndex()); v = getAutoRaiseInterval(); if (v < 0) v = 0; @@ -381,7 +404,6 @@ KAdvancedConfig::KAdvancedConfig(bool _standAlone, KConfig *_config, QWidget *pa void KAdvancedConfig::setShadeHover(bool on) { m_ui->shadeHoverOn->setChecked(on); - m_ui->shadeHoverLabel->setEnabled(on); m_ui->shadeHover->setEnabled(on); } @@ -398,7 +420,6 @@ int KAdvancedConfig::getShadeHoverInterval() void KAdvancedConfig::shadeHoverChanged(bool a) { - m_ui->shadeHoverLabel->setEnabled(a); m_ui->shadeHover->setEnabled(a); }