remove moveResizeMaximized GUI

REVIEW: 110000
This commit is contained in:
Thomas Lübking 2013-04-13 14:15:10 +02:00
parent adf3509647
commit 56d39cb327
3 changed files with 131 additions and 166 deletions

View file

@ -25,156 +25,25 @@
</spacer>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout" columnminimumwidth="1,18,2">
<item row="1" column="0">
<spacer name="horizontalSpacer_5">
<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>
<property name="sizeHint" stdset="0">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
</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="2" column="0">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>100</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1" colspan="2">
<widget class="QCheckBox" name="moveResizeMaximized">
<property name="whatsThis">
<string>When enabled, this feature activates the border of maximized windows and allows you to move or resize them, just like for normal windows</string>
</property>
<property name="text">
<string>Display borders on &amp;maximized windows</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" 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="5" column="2">
<widget class="KIntNumInput" 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="6" 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="6" column="2">
<widget class="KIntNumInput" 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="7" 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="7" column="2">
<widget class="KIntNumInput" name="centerSnap">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -202,7 +71,7 @@
</property>
</widget>
</item>
<item row="8" column="0">
<item row="7" column="0">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -215,18 +84,126 @@
</property>
</spacer>
</item>
<item row="8" 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>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="borderSnapLabel">
<property name="text">
<string>Snap windows onl&amp;y when overlapping</string>
<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="9" column="0" colspan="3">
<widget class="Line" name="line_2">
<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="KIntNumInput" 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="KIntNumInput" 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>
@ -245,7 +222,7 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="label_4">
<property name="font">
<font>

View file

@ -52,7 +52,6 @@
#define KWIN_AUTORAISE "AutoRaise"
#define KWIN_DELAYFOCUS_INTERVAL "DelayFocusInterval"
#define KWIN_CLICKRAISE "ClickRaise"
#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows"
#define KWIN_SHADEHOVER "ShadeHover"
#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval"
#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel"
@ -502,7 +501,6 @@ KMovingConfig::KMovingConfig(bool _standAlone, KConfig *_config, const KComponen
{
// Any changes goes to slotChanged()
connect(m_ui->geometryTipOn, SIGNAL(clicked()), SLOT(changed()));
connect(m_ui->moveResizeMaximized, SIGNAL(toggled(bool)), SLOT(changed()));
connect(m_ui->borderSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
connect(m_ui->windowSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
connect(m_ui->centerSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
@ -521,11 +519,6 @@ bool KMovingConfig::getGeometryTip()
return m_ui->geometryTipOn->isChecked();
}
void KMovingConfig::setMoveResizeMaximized(bool a)
{
m_ui->moveResizeMaximized->setChecked(a);
}
void KMovingConfig::showEvent(QShowEvent *ev)
{
if (!standAlone) {
@ -546,8 +539,6 @@ void KMovingConfig::load(void)
setGeometryTip(showGeomTip);
setMoveResizeMaximized(cg.readEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false));
int v;
v = cg.readEntry(KWM_BRDR_SNAP_ZONE, KWM_BRDR_SNAP_ZONE_DEFAULT);
@ -573,7 +564,6 @@ void KMovingConfig::save(void)
{
KConfigGroup cg(config, "Windows");
cg.writeEntry(KWIN_GEOMETRY, getGeometryTip());
cg.writeEntry(KWIN_MOVE_RESIZE_MAXIMIZED, m_ui->moveResizeMaximized->isChecked());
cg.writeEntry(KWM_BRDR_SNAP_ZONE, getBorderSnapZone());
@ -596,7 +586,6 @@ void KMovingConfig::save(void)
void KMovingConfig::defaults()
{
setGeometryTip(false);
setMoveResizeMaximized(false);
//copied from kcontrol/konq/kwindesktop, aleXXX
setWindowSnapZone(KWM_WNDW_SNAP_ZONE_DEFAULT);

View file

@ -149,7 +149,6 @@ private:
bool getGeometryTip(void); //KS
void setGeometryTip(bool); //KS
void setMoveResizeMaximized(bool);
KConfig *config;
bool standAlone;