improvement: make systemsettings more 1024x600 netbooks friendly
svn path=/trunk/KDE/kdebase/workspace/; revision=851963
This commit is contained in:
parent
14ae8d2dc9
commit
4e9d2d3a25
4 changed files with 74 additions and 91 deletions
|
@ -13,17 +13,25 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget" >
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>585</width>
|
||||
<height>617</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>General</string>
|
||||
<string comment="@option:check">General</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useCompositing" >
|
||||
<property name="text" >
|
||||
<string>Enable desktop effects</string>
|
||||
<string comment="@option:check" >Enable desktop effects</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<bool>true</bool>
|
||||
|
@ -86,7 +94,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
|
@ -114,7 +122,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>21</height>
|
||||
|
@ -125,6 +133,14 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>585</width>
|
||||
<height>617</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>All Effects</string>
|
||||
</attribute>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QtGui/QBoxLayout>
|
||||
#include <QtGui/QCheckBox>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QFormLayout>
|
||||
#include <QtGui/QSlider>
|
||||
#include <QGroupBox>
|
||||
|
||||
|
@ -96,32 +96,20 @@ KDesktopConfig::KDesktopConfig(QWidget *parent, const QVariantList &)
|
|||
|
||||
// name group
|
||||
QGroupBox *name_group = new QGroupBox(i18n("Desktop &Names"), this);
|
||||
QVBoxLayout *vhoxlayout = new QVBoxLayout;
|
||||
name_group->setLayout(vhoxlayout);
|
||||
QFormLayout *namesLayout = new QFormLayout;
|
||||
name_group->setLayout(namesLayout);
|
||||
QFontMetrics fm(label->font());
|
||||
int labelWidth = fm.width(i18n("Desktop %1:", 10)); // be sure that all label will have the same width (with one or two numbers, e.g. 1, 99)
|
||||
for(int i = 0; i < (maxDesktops/2); i++)
|
||||
for(int i = 0; i < maxDesktops; i++)
|
||||
{
|
||||
QHBoxLayout *hboxLayout = new QHBoxLayout;
|
||||
_nameLabel[i] = new QLabel(i18n("Desktop %1:", i+1), name_group);
|
||||
_nameLabel[i]->setMinimumWidth(labelWidth);
|
||||
hboxLayout->addWidget(_nameLabel[i]);
|
||||
_nameInput[i] = new KLineEdit(name_group);
|
||||
hboxLayout->addWidget(_nameInput[i]);
|
||||
_nameLabel[i+(maxDesktops/2)] = new QLabel(i18n("Desktop %1:", i+(maxDesktops/2)+1), name_group);
|
||||
hboxLayout->addWidget(_nameLabel[i+(maxDesktops/2)]);
|
||||
_nameInput[i+(maxDesktops/2)] = new KLineEdit(name_group);
|
||||
hboxLayout->addWidget(_nameInput[i+(maxDesktops/2)]);
|
||||
_nameLabel[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+1 ) );
|
||||
_nameInput[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+1 ) );
|
||||
_nameLabel[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+(maxDesktops/2)+1 ) );
|
||||
_nameInput[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+(maxDesktops/2)+1 ) );
|
||||
|
||||
connect(_nameInput[i], SIGNAL(textChanged(const QString&)),
|
||||
SLOT( changed() ));
|
||||
connect(_nameInput[i+(maxDesktops/2)], SIGNAL(textChanged(const QString&)),
|
||||
SLOT( changed() ));
|
||||
vhoxlayout->addLayout(hboxLayout);
|
||||
namesLayout->addRow(_nameLabel[i],_nameInput[i]);
|
||||
}
|
||||
|
||||
for(int i = 1; i < maxDesktops; i++)
|
||||
|
@ -186,7 +174,10 @@ void KDesktopConfig::load()
|
|||
}
|
||||
|
||||
for(int i = 1; i <= maxDesktops; i++)
|
||||
_nameInput[i-1]->setEnabled(i <= n);
|
||||
{
|
||||
_nameLabel[i-1]->setVisible(i <= n);
|
||||
_nameInput[i-1]->setVisible(i <= n);
|
||||
}
|
||||
emit changed(false);
|
||||
|
||||
#if 0
|
||||
|
@ -253,7 +244,10 @@ void KDesktopConfig::defaults()
|
|||
_nameInput[i]->setText(i18n("Desktop %1", i+1));
|
||||
|
||||
for(int i = 0; i < maxDesktops; i++)
|
||||
_nameInput[i]->setEnabled(i < n);
|
||||
{
|
||||
_nameLabel[i]->setVisible(i < n);
|
||||
_nameInput[i]->setVisible(i < n);
|
||||
}
|
||||
|
||||
#if 0
|
||||
_wheelOption->setChecked(false);
|
||||
|
@ -268,7 +262,8 @@ void KDesktopConfig::slotValueChanged(int n)
|
|||
{
|
||||
for(int i = 0; i < maxDesktops; i++)
|
||||
{
|
||||
_nameInput[i]->setEnabled(i < n);
|
||||
_nameLabel[i]->setVisible(i < n);
|
||||
_nameInput[i]->setVisible(i < n);
|
||||
if(i<n && _nameInput[i]->text().isEmpty())
|
||||
_nameInput[i]->setText(i18n("Desktop %1", i+1));
|
||||
}
|
||||
|
|
|
@ -30,9 +30,11 @@
|
|||
#include <QPixmap>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QFormLayout>
|
||||
|
||||
#include <kconfig.h>
|
||||
#include <kdialog.h>
|
||||
#include <kdebug.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <kcolorscheme.h>
|
||||
#include <kseparator.h>
|
||||
|
@ -617,7 +619,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
QString txtButton1, txtButton3;
|
||||
QStringList items;
|
||||
bool leftHandedMouse = ( KGlobalSettings::mouseSettings().handed == KGlobalSettings::KMouseSettings::LeftHanded);
|
||||
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(KDialog::spacingHint());
|
||||
|
@ -630,9 +632,9 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
box->setWhatsThis( i18n("Here you can customize mouse click behavior when clicking on an inactive"
|
||||
" inner window ('inner' means: not titlebar, not frame).") );
|
||||
|
||||
grid = new QGridLayout(box);
|
||||
grid->setMargin(KDialog::marginHint());
|
||||
grid->setSpacing(KDialog::spacingHint());
|
||||
QFormLayout *formLayout = new QFormLayout(box);
|
||||
formLayout->setMargin(KDialog::marginHint());
|
||||
formLayout->setSpacing(KDialog::spacingHint());
|
||||
|
||||
strMouseButton1 = i18n("Left button:");
|
||||
txtButton1 = i18n("In this row you can customize left click behavior when clicking into"
|
||||
|
@ -651,26 +653,15 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
strWin1 = i18n("In this row you can customize left click behavior when clicking into"
|
||||
" an inactive inner window ('inner' means: not titlebar, not frame).");
|
||||
|
||||
strWin2 = i18n("In this row you can customize middle click behavior when clicking into"
|
||||
" an inactive inner window ('inner' means: not titlebar, not frame).");
|
||||
|
||||
strWin3 = i18n("In this row you can customize right click behavior when clicking into"
|
||||
" an inactive inner window ('inner' means: not titlebar, not frame).");
|
||||
|
||||
// Be nice to lefties
|
||||
if ( leftHandedMouse ) qSwap(strWin1, strWin3);
|
||||
|
||||
label = new QLabel(strMouseButton1, box);
|
||||
grid->addWidget(label, 0, 0);
|
||||
label->setWhatsThis( strWin1 );
|
||||
|
||||
label = new QLabel(i18n("Middle button:"), box);
|
||||
grid->addWidget(label, 1, 0);
|
||||
strWin2 = i18n("In this row you can customize middle click behavior when clicking into"
|
||||
" an inactive inner window ('inner' means: not titlebar, not frame).");
|
||||
label->setWhatsThis( strWin2 );
|
||||
|
||||
label = new QLabel(strMouseButton3, box);
|
||||
grid->addWidget(label, 2, 0);
|
||||
label->setWhatsThis( strWin3 );
|
||||
|
||||
items.clear();
|
||||
items << i18n("Activate, Raise & Pass Click")
|
||||
<< i18n("Activate & Pass Click")
|
||||
|
@ -678,25 +669,25 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
<< i18n("Activate & Raise");
|
||||
|
||||
QComboBox* combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 0, 1);
|
||||
coWin1 = combo;
|
||||
combo->addItems(items);
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coWin1 = combo;
|
||||
combo->setWhatsThis( strWin1 );
|
||||
formLayout->addRow(strMouseButton1, combo);
|
||||
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 1, 1);
|
||||
combo->addItems(items);
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coWin2 = combo;
|
||||
combo->setWhatsThis( strWin2 );
|
||||
formLayout->addRow(i18n("Middle button:"), combo);
|
||||
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 2, 1);
|
||||
combo->addItems(items);
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coWin3 = combo;
|
||||
combo->setWhatsThis( strWin3 );
|
||||
formLayout->addRow(strMouseButton3, combo);
|
||||
|
||||
|
||||
/** Inner window, titlebar and frame **************/
|
||||
|
@ -707,19 +698,11 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
box->setWhatsThis( i18n("Here you can customize KDE's behavior when clicking somewhere into"
|
||||
" a window while pressing a modifier key."));
|
||||
|
||||
grid = new QGridLayout(box);
|
||||
grid->setMargin(KDialog::marginHint());
|
||||
grid->setSpacing(KDialog::spacingHint());
|
||||
formLayout = new QFormLayout(box);
|
||||
formLayout->setMargin(KDialog::marginHint());
|
||||
formLayout->setSpacing(KDialog::spacingHint());
|
||||
|
||||
// Labels
|
||||
label = new QLabel(i18n("Modifier key:"), box);
|
||||
grid->addWidget(label, 0, 0);
|
||||
|
||||
strAllKey = i18n("Here you select whether holding the Meta key or Alt key "
|
||||
"will allow you to perform the following actions.");
|
||||
label->setWhatsThis( strAllKey );
|
||||
|
||||
|
||||
strMouseButton1 = i18n("Modifier key + left button:");
|
||||
strAll1 = i18n("In this row you can customize left click behavior when clicking into"
|
||||
" the titlebar or the frame.");
|
||||
|
@ -734,34 +717,15 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
qSwap(strAll1, strAll3);
|
||||
}
|
||||
|
||||
label = new QLabel(strMouseButton1, box);
|
||||
grid->addWidget(label, 1, 0);
|
||||
label->setWhatsThis( strAll1);
|
||||
|
||||
label = new QLabel(i18n("Modifier key + middle button:"), box);
|
||||
grid->addWidget(label, 2, 0);
|
||||
strAll2 = i18n("Here you can customize KDE's behavior when middle clicking into a window"
|
||||
" while pressing the modifier key.");
|
||||
label->setWhatsThis( strAll2 );
|
||||
|
||||
label = new QLabel(strMouseButton3, box);
|
||||
grid->addWidget(label, 3, 0);
|
||||
label->setWhatsThis( strAll3);
|
||||
|
||||
label = new QLabel(i18n("Modifier key + mouse wheel:"), box);
|
||||
grid->addWidget(label, 4, 0);
|
||||
strAllW = i18n("Here you can customize KDE's behavior when scrolling with the mouse wheel"
|
||||
" in a window while pressing the modifier key.");
|
||||
label->setWhatsThis( strAllW);
|
||||
|
||||
// Combo's
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 0, 1);
|
||||
combo->addItem(i18n("Meta"));
|
||||
combo->addItem(i18n("Alt"));
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coAllKey = combo;
|
||||
combo->setWhatsThis( strAllKey );
|
||||
combo->setWhatsThis( i18n("Here you select whether holding the Meta key or Alt key "
|
||||
"will allow you to perform the following actions.") );
|
||||
formLayout->addRow(i18n("Modifier key:"), combo);
|
||||
|
||||
items.clear();
|
||||
items << i18n("Move")
|
||||
|
@ -774,28 +738,30 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
<< i18n("Nothing");
|
||||
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 1, 1);
|
||||
combo->addItems(items);
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coAll1 = combo;
|
||||
combo->setWhatsThis( strAll1 );
|
||||
formLayout->addRow(strMouseButton1, combo);
|
||||
|
||||
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 2, 1);
|
||||
combo->addItems(items);
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coAll2 = combo;
|
||||
combo->setWhatsThis( strAll2 );
|
||||
combo->setWhatsThis( i18n("Here you can customize KDE's behavior when middle clicking into a window"
|
||||
" while pressing the modifier key.") );
|
||||
formLayout->addRow(i18n("Modifier key + middle button:"), combo);
|
||||
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 3, 1);
|
||||
combo->addItems(items);
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coAll3 = combo;
|
||||
combo->setWhatsThis( strAll3 );
|
||||
formLayout->addRow(strMouseButton3, combo);
|
||||
|
||||
|
||||
combo = new QComboBox(box);
|
||||
grid->addWidget(combo, 4, 1);
|
||||
combo->addItem(i18n("Raise/Lower"));
|
||||
combo->addItem(i18n("Shade/Unshade"));
|
||||
combo->addItem(i18n("Maximize/Restore"));
|
||||
|
@ -805,10 +771,12 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
|||
combo->addItem(i18n("Nothing"));
|
||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||
coAllW = combo;
|
||||
combo->setWhatsThis( strAllW );
|
||||
combo->setWhatsThis( i18n("Here you can customize KDE's behavior when scrolling with the mouse wheel"
|
||||
" in a window while pressing the modifier key.") );
|
||||
formLayout->addRow(i18n("Modifier key + mouse wheel:"), combo);
|
||||
|
||||
|
||||
layout->addStretch();
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QFormLayout>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
|
@ -610,7 +611,7 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, const KCom
|
|||
delays = new KIntNumInput(10, electricBox);
|
||||
delays->setRange(0, MAX_EDGE_RES, 50);
|
||||
delays->setSuffix(i18n(" ms"));
|
||||
delays->setLabel(i18n("Desktop &switch delay:"));
|
||||
delays->setLabel(i18n("Desktop &switch delay:"), Qt::AlignVCenter|Qt::AlignLeft);
|
||||
delays->setWhatsThis( i18n("Here you can set a delay for switching desktops using the active"
|
||||
" borders feature. Desktops will be switched after the mouse has been pushed against a screen border"
|
||||
" for the specified number of milliseconds.") );
|
||||
|
@ -901,6 +902,9 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
|
|||
//lay->addWidget(plcBox);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//CT 15mar98 - add EdgeResistance, BorderAttractor, WindowsAttractor config
|
||||
MagicBox = new KButtonGroup(this);
|
||||
MagicBox->setTitle(i18n("Snap Zones"));
|
||||
|
@ -909,7 +913,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
|
|||
BrdrSnap = new KIntNumInput(10, MagicBox);
|
||||
BrdrSnap->setSpecialValueText( i18n("none") );
|
||||
BrdrSnap->setRange( 0, MAX_BRDR_SNAP);
|
||||
BrdrSnap->setLabel(i18n("&Border snap zone:"));
|
||||
BrdrSnap->setLabel(i18n("&Border snap zone:"), Qt::AlignVCenter|Qt::AlignLeft);
|
||||
BrdrSnap->setSteps(1,10);
|
||||
BrdrSnap->setWhatsThis( i18n("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"
|
||||
|
@ -919,7 +923,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
|
|||
WndwSnap = new KIntNumInput(10, MagicBox);
|
||||
WndwSnap->setSpecialValueText( i18n("none") );
|
||||
WndwSnap->setRange( 0, MAX_WNDW_SNAP);
|
||||
WndwSnap->setLabel(i18n("&Window snap zone:"));
|
||||
WndwSnap->setLabel(i18n("&Window snap zone:"), Qt::AlignVCenter|Qt::AlignLeft);
|
||||
WndwSnap->setSteps(1,10);
|
||||
WndwSnap->setWhatsThis( i18n("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"
|
||||
|
@ -929,7 +933,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
|
|||
CntrSnap = new KIntNumInput(10, MagicBox);
|
||||
CntrSnap->setSpecialValueText( i18n("none") );
|
||||
CntrSnap->setRange( 0, MAX_CNTR_SNAP);
|
||||
CntrSnap->setLabel(i18n("&Center snap zone:"));
|
||||
CntrSnap->setLabel(i18n("&Center snap zone:"), Qt::AlignVCenter|Qt::AlignLeft);
|
||||
CntrSnap->setSteps(1,10);
|
||||
CntrSnap->setWhatsThis( i18n("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"
|
||||
|
|
Loading…
Reference in a new issue