summaryrefslogtreecommitdiffstats
path: root/kcontrol/style
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kcontrol/style
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/style')
-rw-r--r--kcontrol/style/kcmstyle.cpp34
-rw-r--r--kcontrol/style/kcmstyle.h2
2 files changed, 29 insertions, 7 deletions
diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp
index 9333c0f72..098990afd 100644
--- a/kcontrol/style/kcmstyle.cpp
+++ b/kcontrol/style/kcmstyle.cpp
@@ -229,6 +229,14 @@ KCMStyle::KCMStyle( QWidget* parent, const char* name )
containerLayout->addWidget( lblTooltipEffect, 1, 0 );
containerLayout->addWidget( comboTooltipEffect, 1, 1 );
+ comboRubberbandEffect = new QComboBox( FALSE, containerFrame );
+ comboRubberbandEffect->insertItem( i18n("Disable") );
+ comboRubberbandEffect->insertItem( i18n("Make translucent") );
+ lblRubberbandEffect = new QLabel( i18n("&Rubberband effect:"), containerFrame );
+ lblRubberbandEffect->setBuddy( comboRubberbandEffect );
+ containerLayout->addWidget( lblRubberbandEffect, 2, 0 );
+ containerLayout->addWidget( comboRubberbandEffect, 2, 1 );
+
comboMenuEffect = new QComboBox( FALSE, containerFrame );
comboMenuEffect->insertItem( i18n("Disable") );
comboMenuEffect->insertItem( i18n("Animate") );
@@ -236,8 +244,8 @@ KCMStyle::KCMStyle( QWidget* parent, const char* name )
comboMenuEffect->insertItem( i18n("Make Translucent") );
lblMenuEffect = new QLabel( i18n("&Menu effect:"), containerFrame );
lblMenuEffect->setBuddy( comboMenuEffect );
- containerLayout->addWidget( lblMenuEffect, 2, 0 );
- containerLayout->addWidget( comboMenuEffect, 2, 1 );
+ containerLayout->addWidget( lblMenuEffect, 3, 0 );
+ containerLayout->addWidget( comboMenuEffect, 3, 1 );
comboMenuHandle = new QComboBox( FALSE, containerFrame );
comboMenuHandle->insertItem( i18n("Disable") );
@@ -245,11 +253,11 @@ KCMStyle::KCMStyle( QWidget* parent, const char* name )
// comboMenuHandle->insertItem( i18n("Enable") );
lblMenuHandle = new QLabel( i18n("Me&nu tear-off handles:"), containerFrame );
lblMenuHandle->setBuddy( comboMenuHandle );
- containerLayout->addWidget( lblMenuHandle, 3, 0 );
- containerLayout->addWidget( comboMenuHandle, 3, 1 );
+ containerLayout->addWidget( lblMenuHandle, 4, 0 );
+ containerLayout->addWidget( comboMenuHandle, 4, 1 );
cbMenuShadow = new QCheckBox( i18n("Menu &drop shadow"), containerFrame );
- containerLayout->addWidget( cbMenuShadow, 4, 0 );
+ containerLayout->addWidget( cbMenuShadow, 5, 0 );
// Push the [label combo] to the left.
comboSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
@@ -359,6 +367,7 @@ KCMStyle::KCMStyle( QWidget* parent, const char* name )
connect( cbEnableEffects, SIGNAL(toggled(bool)), this, SLOT(setEffectsDirty()));
connect( cbEnableEffects, SIGNAL(toggled(bool)), this, SLOT(setStyleDirty()));
connect( comboTooltipEffect, SIGNAL(activated(int)), this, SLOT(setEffectsDirty()));
+ connect( comboRubberbandEffect, SIGNAL(activated(int)), this, SLOT(setStyleDirty()));
connect( comboComboEffect, SIGNAL(activated(int)), this, SLOT(setEffectsDirty()));
connect( comboMenuEffect, SIGNAL(activated(int)), this, SLOT(setStyleDirty()));
connect( comboMenuHandle, SIGNAL(activated(int)), this, SLOT(setStyleDirty()));
@@ -556,6 +565,11 @@ void KCMStyle::save()
item = comboTooltipEffect->currentItem();
config.writeEntry( "EffectAnimateTooltip", item == 1);
config.writeEntry( "EffectFadeTooltip", item == 2 );
+ item = comboRubberbandEffect->currentItem();
+ {
+ QSettings settings; // Only for KStyle stuff
+ settings.writeEntry("/KStyle/Settings/SemiTransparentRubberband", item == 1);
+ }
item = comboMenuHandle->currentItem();
config.writeEntry( "InsertTearOffHandle", item );
item = comboMenuEffect->currentItem();
@@ -887,7 +901,11 @@ void KCMStyle::loadEffects( KConfig& config )
comboTooltipEffect->setCurrentItem( 2 );
else
comboTooltipEffect->setCurrentItem( 0 );
-
+
+ QSettings settings;
+ bool semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", false);
+ comboRubberbandEffect->setCurrentItem( semiTransparentRubberband ? 1 : 0 );
+
if ( config.readBoolEntry( "EffectAnimateMenu", false) )
comboMenuEffect->setCurrentItem( 1 );
else if ( config.readBoolEntry( "EffectFadeMenu", false) )
@@ -898,7 +916,7 @@ void KCMStyle::loadEffects( KConfig& config )
comboMenuHandle->setCurrentItem(config.readNumEntry("InsertTearOffHandle", 0));
// KStyle Menu transparency and drop-shadow options...
- QSettings settings;
+
QString effectEngine = settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled");
#ifdef HAVE_XRENDER
@@ -1027,6 +1045,8 @@ void KCMStyle::addWhatsThis()
QWhatsThis::add( comboTooltipEffect, i18n( "<p><b>Disable: </b>do not use any tooltip effects.</p>\n"
"<p><b>Animate: </b>Do some animation.</p>\n"
"<b>Fade: </b>Fade in tooltips using alpha-blending.") );
+ QWhatsThis::add( comboRubberbandEffect, i18n( "<p><b>Disable: </b>do not use any rubberband effects.</p>\n"
+ "<b>Make Translucent: </b>Draw a translucent rubberband.") );
QWhatsThis::add( comboMenuEffect, i18n( "<p><b>Disable: </b>do not use any menu effects.</p>\n"
"<p><b>Animate: </b>Do some animation.</p>\n"
"<p><b>Fade: </b>Fade in menus using alpha-blending.</p>\n"
diff --git a/kcontrol/style/kcmstyle.h b/kcontrol/style/kcmstyle.h
index fb2909b1a..6f6da6d1c 100644
--- a/kcontrol/style/kcmstyle.h
+++ b/kcontrol/style/kcmstyle.h
@@ -126,11 +126,13 @@ private:
QFrame* containerFrame;
QGridLayout* containerLayout;
QComboBox* comboTooltipEffect;
+ QComboBox* comboRubberbandEffect;
QComboBox* comboComboEffect;
QComboBox* comboMenuEffect;
QComboBox* comboMenuHandle;
QLabel* lblTooltipEffect;
+ QLabel* lblRubberbandEffect;
QLabel* lblComboEffect;
QLabel* lblMenuEffect;
QLabel* lblMenuHandle;