[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
This commit is contained in:
Björn Feber 2019-09-05 19:41:27 +02:00
parent 42326f6ded
commit 663d139638
13 changed files with 1766 additions and 2469 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,253 +6,167 @@
<rect>
<x>0</x>
<y>0</y>
<width>504</width>
<height>387</height>
<width>600</width>
<height>500</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="2,1,5">
<item row="2" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<layout class="QFormLayout" name="formLayout">
<property name="formAlignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="shadeHoverLabel">
<property name="text">
<string>Window &amp;unshading:</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="buddy">
<cstring>shadeHoverOn</cstring>
</property>
</spacer>
</item>
<item row="2" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="wtBox">
<property name="title">
<string>Window Tabbing</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="wtLay">
<item>
<widget class="QCheckBox" name="inactiveTabsSkipTaskbar">
<property name="whatsThis">
<string>When turned on hide all tabs that are not active from the taskbar.</string>
</property>
<property name="text">
<string>Hide inactive window tabs from the taskbar</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autogroupSimilarWindows">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Automatically group similar windows</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autogroupInForeground">
<property name="whatsThis">
<string>When turned on immediately switch to any new window tabs that were automatically added to the current group.</string>
</property>
<property name="text">
<string>Switch to automatically grouped windows immediately</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>&amp;Placement:</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="KComboBox" name="placementCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>The placement policy determines where a new window will appear on the desktop.&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Smart&lt;/em&gt; will try to achieve a minimum overlap of windows&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Maximizing&lt;/em&gt; 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.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Cascade&lt;/em&gt; will cascade the windows&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Random&lt;/em&gt; will use a random position&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Centered&lt;/em&gt; will place the window centered&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Zero-Cornered&lt;/em&gt; will place the window in the top-left corner&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Under Mouse&lt;/em&gt; will place the window under the pointer&lt;/li&gt;
&lt;/ul&gt;</string>
</property>
<item>
<property name="text">
<string>Smart</string>
</property>
</item>
<item>
<property name="text">
<string>Maximizing</string>
</property>
</item>
<item>
<property name="text">
<string>Cascade</string>
</property>
</item>
<item>
<property name="text">
<string>Random</string>
</property>
</item>
<item>
<property name="text">
<string>Centered</string>
</property>
</item>
<item>
<property name="text">
<string>Zero-Cornered</string>
</property>
</item>
<item>
<property name="text">
<string>Under Mouse</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="shBox">
<property name="title">
<string>Shading</string>
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item>
<widget class="QCheckBox" name="shadeHoverOn">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If this option is enabled, a shaded window will unshade automatically when the mouse pointer has been over the titlebar for some time.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>On titlebar hover after:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="shadeHover">
<property name="whatsThis">
<string>Sets the time in milliseconds before the window unshades when the mouse pointer goes over the shaded window.</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>250</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="windowPlacementLabel">
<property name="text">
<string>Window &amp;placement:</string>
</property>
<property name="flat">
<bool>true</bool>
<property name="buddy">
<cstring>placementCombo</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KComboBox" name="placementCombo">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The placement policy determines where a new window will appear on the desktop.&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Smart&lt;/span&gt; will try to achieve a minimum overlap of windows&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Maximizing&lt;/span&gt; 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.&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Cascade&lt;/span&gt; will cascade the windows&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Random&lt;/span&gt; will use a random position&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Centered&lt;/span&gt; will place the window centered&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Zero-cornered&lt;/span&gt; will place the window in the top-left corner&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Under mouse&lt;/span&gt; will place the window under the pointer&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Smart</string>
</property>
</item>
<item>
<property name="text">
<string>Maximizing</string>
</property>
</item>
<item>
<property name="text">
<string>Cascade</string>
</property>
</item>
<item>
<property name="text">
<string>Random</string>
</property>
</item>
<item>
<property name="text">
<string>Centered</string>
</property>
</item>
<item>
<property name="text">
<string>Zero-cornered</string>
</property>
</item>
<item>
<property name="text">
<string>Under mouse</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="windowTabbingLabel">
<property name="text">
<string>Window tabbing:</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="1">
<widget class="QLabel" name="shadeHoverLabel">
<property name="text">
<string>Dela&amp;y:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>shadeHover</cstring>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>24</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" rowspan="3" colspan="5">
<widget class="QCheckBox" name="shadeHoverOn">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>&amp;Enable hover</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="3">
<widget class="QSpinBox" name="shadeHover">
<property name="whatsThis">
<string>Sets the time in milliseconds before the window unshades when the mouse pointer goes over the shaded window.</string>
</property>
<property name="value">
<number>500</number>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="suffix">
<string> ms</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Special Windows</string>
<widget class="QCheckBox" name="autogroupInForeground">
<property name="whatsThis">
<string>When turned on immediately switch to any new window tabs that were automatically added to the current group.</string>
</property>
<property name="flat">
<bool>true</bool>
<property name="text">
<string>&amp;Switch to automatically grouped windows immediately</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="inactiveTabsSkipTaskbar">
<property name="whatsThis">
<string>When turned on hide all tabs that are not active from the taskbar.</string>
</property>
<property name="text">
<string>&amp;Hide inactive window tabs from the taskbar</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="specialWindowsLabel">
<property name="text">
<string>&amp;Special windows:</string>
</property>
<property name="buddy">
<cstring>hideUtilityWindowsForInactive</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="hideUtilityWindowsForInactive">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Hide utility windows for inactive applications</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="autogroupSimilarWindows">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>&amp;Group similar windows automatically</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="hideUtilityWindowsForInactive">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Hide utility windows for inactive applications</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -263,21 +177,7 @@
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>QSpinBox</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>shadeHoverOn</tabstop>
<tabstop>shadeHover</tabstop>
<tabstop>inactiveTabsSkipTaskbar</tabstop>
<tabstop>autogroupSimilarWindows</tabstop>
<tabstop>autogroupInForeground</tabstop>
<tabstop>placementCombo</tabstop>
<tabstop>hideUtilityWindowsForInactive</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View file

@ -6,502 +6,239 @@
<rect>
<x>0</x>
<y>0</y>
<width>656</width>
<height>540</height>
<width>600</width>
<height>500</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2" rowstretch="1,1,1,100" columnstretch="1,2,3,2">
<item row="0" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout_1">
<property name="formAlignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Activating windows</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="3" column="1">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>&lt;b&gt;Click To Focus&lt;/b&gt;&lt;br&gt;
A window becomes active when you click into it.&lt;br&gt;&lt;br&gt;
This behaviour is common on other operating systems and&lt;br&gt;
likely what you want.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_3">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>&lt;b&gt;Click To Focus - Mouse Precedence&lt;/b&gt;&lt;br&gt;
This is mostly the same as &lt;i&gt;Click To Focus&lt;/i&gt;&lt;br&gt;&lt;br&gt;
If an active window has to be chosen by the system&lt;br&gt;
(eg. because the currently active one was closed) &lt;br&gt;
the window under the mouse is the preferred candidate.&lt;br&gt;&lt;br&gt;
Unusual, but possible variant of &lt;i&gt;Click To Focus&lt;/i&gt;.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_4">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>&lt;b&gt;Focus Follows Mouse&lt;/b&gt;&lt;br&gt;
Moving the mouse onto a window will activate it.&lt;br&gt;&lt;br&gt;
Eg. windows randomly appearing under the mouse will not gain the focus.&lt;br&gt;
Focus stealing prevention takes place as usual.&lt;br&gt;&lt;br&gt;
Think as &lt;i&gt;Click To Focus&lt;/i&gt; just without having to actually click.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_5">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;b&gt;Focus Follows Mouse - Mouse Precedence&lt;/b&gt;&lt;br&gt;
This is mostly the same as &lt;i&gt;Focus Follows Mouse&lt;/i&gt;&lt;br&gt;&lt;br&gt;
If an active window has to be chosen by the system&lt;br&gt;
(eg. because the currently active one was closed) &lt;br&gt;
the window under the mouse is the preferred candidate.&lt;br&gt;&lt;br&gt;
Choose this, if you want a hover controlled focus.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>&lt;b&gt;Focus Under Mouse&lt;/b&gt;&lt;br&gt;
The focus always remains on the window under the mouse.&lt;br&gt;&lt;br&gt;
Notice:&lt;br&gt;
&lt;b&gt;Focus stealing prevention&lt;/b&gt; and the &lt;b&gt;tabbox (&quot;Alt+Tab&quot;)&lt;/b&gt;&lt;br&gt;
contradict the policy and &lt;b&gt;will not work&lt;/b&gt;.&lt;br&gt;&lt;br&gt;
You very likely want to use&lt;br&gt;
&lt;i&gt;Focus Follows Mouse - Mouse Precedence&lt;/i&gt; instead!</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_6">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>&lt;b&gt;Focus Strictly Under Mouse&lt;/b&gt;&lt;br&gt;
The focus is always on the window under the mouse - in doubt nowhere -&lt;br&gt;
very much like the focus behaviour in an unmanaged legacy X11 environment.&lt;br&gt;&lt;br&gt;
Notice:&lt;br&gt;
&lt;b&gt;Focus stealing prevention&lt;/b&gt; and the &lt;b&gt;tabbox (&quot;Alt+Tab&quot;)&lt;/b&gt;&lt;br&gt;
contradict the policy and &lt;b&gt;will not work&lt;/b&gt;.&lt;br&gt;&lt;br&gt;
You very likely want to use&lt;br&gt;
&lt;i&gt;Focus Follows Mouse - Mouse Precedence&lt;/i&gt; instead!</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="100,1,1">
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="delayFocusOnLabel">
<property name="text">
<string>&amp;Delay focus by</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>delayFocus</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="delayFocus">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>This is the delay after which the window the mouse pointer is over will automatically receive focus.</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>99</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_8" stretch="1,1,100">
<item>
<widget class="QLabel" name="focusStealingLabel">
<property name="text">
<string>Focus &amp;stealing prevention</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>focusStealing</cstring>
</property>
</widget>
</item>
<item>
<widget class="KComboBox" name="focusStealing">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>&lt;p&gt;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.)
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;None:&lt;/em&gt; Prevention is turned off and new windows always become activated.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Low:&lt;/em&gt; 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.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Medium:&lt;/em&gt; Prevention is enabled.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;High:&lt;/em&gt; 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.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Extreme:&lt;/em&gt; All windows must be explicitly activated by the user.&lt;/li&gt;
&lt;/ul&gt;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</string>
</property>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">None</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">Low</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">Medium</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">High</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">Extreme</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" colspan="3">
<layout class="QGridLayout" name="gridLayout_3">
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="1" column="2">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Policy</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Click</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QSlider" name="windowFocusPolicy">
<property name="maximum">
<number>5</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::NoTicks</enum>
</property>
<property name="tickInterval">
<number>0</number>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Hover</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" colspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Raising windows</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="1,1,100">
<item row="1" column="0">
<widget class="QCheckBox" name="autoRaiseOn">
<property name="whatsThis">
<string>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.</string>
</property>
<item row="0" column="0">
<widget class="QLabel" name="windowFocusPolicyLabel">
<property name="text">
<string>Window &amp;activation policy:</string>
</property>
<property name="buddy">
<cstring>windowFocusPolicyCombo</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="windowFocusPolicyCombo">
<property name="whatsThis">
<string>With this option you can specify how and when windows will be focused.</string>
</property>
<item>
<property name="text">
<string>&amp;Raise on hover, delayed by</string>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="autoRaise">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>This is the delay after which the window that the mouse pointer is over will automatically come to the front.</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>99</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="clickRaiseOn">
<property name="whatsThis">
<string>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.</string>
<string comment="sassa asas">Click to focus</string>
</property>
</item>
<item>
<property name="text">
<string>C&amp;lick raises active window</string>
<string>Click to focus (mouse precedence)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<property name="text">
<string>Focus follows mouse</string>
</property>
</item>
<item>
<property name="text">
<string>Focus follows mouse (mouse precedence)</string>
</property>
</item>
<item>
<property name="text">
<string>Focus under mouse</string>
</property>
</item>
<item>
<property name="text">
<string>Focus strictly under mouse</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="delayFocusOnLabel">
<property name="text">
<string>&amp;Delay focus by:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>delayFocus</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="delayFocus">
<property name="whatsThis">
<string>This is the delay after which the window the mouse pointer is over will automatically receive focus.</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="focusStealingLabel">
<property name="text">
<string>Focus &amp;stealing prevention:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>focusStealing</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="KComboBox" name="focusStealing">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;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 &lt;span style=&quot; font-style:italic;&quot;&gt;Focus under mouse&lt;/span&gt; or &lt;span style=&quot; font-style:italic;&quot;&gt;Focus strictly under mouse&lt;/span&gt; focus policies.) &lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;None:&lt;/span&gt; Prevention is turned off and new windows always become activated.&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Low:&lt;/span&gt; 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.&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Medium:&lt;/span&gt; Prevention is enabled.&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;High:&lt;/span&gt; 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.&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Extreme:&lt;/span&gt; All windows must be explicitly activated by the user.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">None</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">Low</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">Medium</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">High</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Focus Stealing Prevention Level">Extreme</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="raisingWindowsLabel">
<property name="text">
<string>Raising windows:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="clickRaiseOn">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>&amp;Click raises active window</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item>
<widget class="QCheckBox" name="autoRaiseOn">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>&amp;Raise on hover, delayed by:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="autoRaise">
<property name="whatsThis">
<string>This is the delay after which the window that the mouse pointer is over will automatically come to the front.</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="multiscreenBehaviorLabel">
<property name="text">
<string>Multiscreen behavior:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="activeMouseScreen">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Active screen follows &amp;mouse</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="separateScreenFocus">
<property name="whatsThis">
<string>When this option is enabled, focus operations are limited only to the active Xinerama screen</string>
</property>
<property name="text">
<string>&amp;Separate screen focus</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="windowFocusPolicyDescriptionLabel">
<property name="minimumSize">
<size>
<width>280</width>
<height>0</height>
</size>
</property>
<property name="text">
<string notr="true">Window activation policy description</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="2">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -509,43 +246,11 @@ You very likely want to use&lt;br&gt;
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>192</height>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1" colspan="2">
<widget class="QGroupBox" name="multiscreenBox">
<property name="title">
<string>Multiscreen behaviour</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="separateScreenFocus">
<property name="whatsThis">
<string>When this option is enabled, focus operations are limited only to the active Xinerama screen</string>
</property>
<property name="text">
<string>S&amp;eparate screen focus</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="activeMouseScreen">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Active screen follows &amp;mouse</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
@ -555,31 +260,6 @@ You very likely want to use&lt;br&gt;
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>focusStealing</tabstop>
<tabstop>autoRaiseOn</tabstop>
<tabstop>autoRaise</tabstop>
<tabstop>delayFocus</tabstop>
<tabstop>separateScreenFocus</tabstop>
<tabstop>activeMouseScreen</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>windowFocusPolicy</sender>
<signal>valueChanged(int)</signal>
<receiver>stackedWidget</receiver>
<slot>setCurrentIndex(int)</slot>
<hints>
<hint type="sourcelabel">
<x>244</x>
<y>38</y>
</hint>
<hint type="destinationlabel">
<x>444</x>
<y>84</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 =

View file

@ -253,8 +253,8 @@ const char* const tbl_WinWheel[] = {
};
const char* const tbl_AllKey[] = {
"Meta",
"Alt",
"Meta",
""
};

File diff suppressed because it is too large Load diff

View file

@ -6,259 +6,159 @@
<rect>
<x>0</x>
<y>0</y>
<width>624</width>
<height>354</height>
<width>600</width>
<height>500</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnminimumwidth="0,0,100">
<layout class="QFormLayout" name="formLayout">
<property name="formAlignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QLabel" name="geometryTipLabel">
<property name="text">
<string>Window &amp;geometry:</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="buddy">
<cstring>geometryTipOn</cstring>
</property>
</spacer>
</widget>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout">
<item row="7" column="1" colspan="2">
<widget class="QCheckBox" name="OverlapSnap">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Snap windows onl&amp;y when overlapping</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QSpinBox" name="centerSnap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>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.</string>
</property>
<property name="value">
<number>10</number>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="suffix">
<string> pixel</string>
</property>
<property name="specialValueText">
<string>no center snap zone</string>
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>107</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="borderSnapLabel">
<property name="text">
<string>&amp;Border snap zone:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>borderSnap</cstring>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QLabel" name="centerSnapLabel">
<property name="text">
<string>&amp;Center snap zone:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>centerSnap</cstring>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QSpinBox" name="windowSnap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>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.</string>
</property>
<property name="value">
<number>10</number>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="suffix">
<string> pixel</string>
</property>
<property name="specialValueText">
<string>no window snap zone</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QSpinBox" name="borderSnap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>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.</string>
</property>
<property name="value">
<number>10</number>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="suffix">
<string> pixel</string>
</property>
<property name="specialValueText">
<string>no border snap zone</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QCheckBox" name="geometryTipOn">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Display window &amp;geometry when moving or resizing</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="windowSnapLabel">
<property name="text">
<string>&amp;Window snap zone:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>windowSnap</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Windows</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Snap Zones</string>
</property>
</widget>
</item>
</layout>
<widget class="QCheckBox" name="geometryTipOn">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Display when moving or resizing</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="2" column="0">
<widget class="QLabel" name="borderSnapLabel">
<property name="text">
<string>Screen &amp;edge snap zone:</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="buddy">
<cstring>borderSnap</cstring>
</property>
</spacer>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="borderSnap">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="specialValueText">
<string>None</string>
</property>
<property name="suffix">
<string> px</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="windowSnap">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="specialValueText">
<string>None</string>
</property>
<property name="suffix">
<string> px</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="centerSnap">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="specialValueText">
<string>None</string>
</property>
<property name="suffix">
<string> px</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="OverlapSnap">
<property name="whatsThis">
<string>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.</string>
</property>
<property name="text">
<string>Only when overlapping</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="windowSnapLabel">
<property name="text">
<string>&amp;Window snap zone:</string>
</property>
<property name="buddy">
<cstring>windowSnap</cstring>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="centerSnaplabel">
<property name="text">
<string>&amp;Center snap zone:</string>
</property>
<property name="buddy">
<cstring>centerSnap</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="OverlapSnapLabel">
<property name="text">
<string>&amp;Snap windows:</string>
</property>
<property name="buddy">
<cstring>OverlapSnap</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="verticalSpacer">
<spacer name="verticalSpacer_1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>112</height>
<height>2</height>
</size>
</property>
</spacer>

View file

@ -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("<html><head/><body><p><span style=\" font-style:italic;\">Click to focus:</span> A window becomes active when you click into it. This behavior is common on other operating systems and likely what you want.</p></body></html>"));
break;
case 1:
m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("<html><head/><body><p><span style=\" font-style:italic;\">Click to focus (mouse precedence):</span> Mostly the same as <span style=\" font-style:italic;\">Click to focus</span>. 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 <span style=\" font-style:italic;\">Click to focus</span>.</p></body></html>"));
break;
case 2:
m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("<html><head/><body><p><span style=\" font-style:italic;\">Focus follows mouse:</span> Moving the mouse onto a window will activate it. Eg. windows randomly appearing under the mouse will not gain the focus. <span style=\" font-style:italic;\">Focus stealing prevention</span> takes place as usual. Think as <span style=\" font-style:italic;\">Click to focus</span> just without having to actually click.</p></body></html>"));
break;
case 3:
m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("<html><head/><body><p>This is mostly the same as <span style=\" font-style:italic;\">Focus follows mouse</span>. 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.</p></body></html>"));
break;
case 4:
m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("<html><head/><body><p><span style=\" font-style:italic;\">Focus under mouse:</span> The focus always remains on the window under the mouse.<br/><span style=\" font-weight:600;\">Warning: </span><span style=\" font-style:italic;\">Focus stealing prevention</span> and the <span style=\" font-style:italic;\">tabbox ('Alt+Tab') </span>contradict the activation policy and will not work. You very likely want to use <span style=\" font-style:italic;\">Focus follows mouse (mouse precedence)</span> instead!</p></body></html>"));
break;
case 5:
m_ui->windowFocusPolicyDescriptionLabel->setText(i18n("<html><head/><body><p><span style=\" font-style:italic;\">Focus strictly under mouse:</span> 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.<br/><span style=\" font-weight:600;\">Warning: </span><span style=\" font-style:italic;\">Focus stealing prevention</span> and the <span style=\" font-style:italic;\">tabbox ('Alt+Tab') </span>contradict the activation policy and will not work. You very likely want to use <span style=\" font-style:italic;\">Focus follows mouse (mouse precedence)</span> instead!</p></body></html>"));
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);
}