3 * Copyright (C) 2002 Karol Szwed <gallium@kde.org>
4 * Copyright (C) 2002 Daniel Molkentin <molkentin@kde.org>
5 * Copyright (C) 2007 Urs Wolfer <uwolfer @ kde.org>
7 * Portions Copyright (C) 2000 TrollTech AS.
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License version 2 as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; see the file COPYING. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
27 #include <config-X11.h>
30 #include "styleconfdialog.h"
31 #include "ui_stylepreview.h"
33 #include <kaboutdata.h>
34 #include <kapplication.h>
35 #include <kcombobox.h>
36 #include <kmessagebox.h>
38 #include <kstandarddirs.h>
41 #include <QtCore/QFile>
42 #include <QtCore/QSettings>
43 #include <QtGui/QLabel>
44 #include <QtGui/QPixmapCache>
45 #include <QtGui/QStyleFactory>
46 #include <QtGui/QFormLayout>
47 #include <QtDBus/QtDBus>
53 #include "../krdb/krdb.h"
59 // X11 namespace cleanup
65 /**** DLL Interface for kcontrol ****/
67 #include <kpluginfactory.h>
68 #include <kpluginloader.h>
71 K_PLUGIN_FACTORY(KCMStyleFactory
, registerPlugin
<KCMStyle
>();)
72 K_EXPORT_PLUGIN(KCMStyleFactory("kcmstyle"))
77 KDE_EXPORT
void kcminit_style()
79 uint flags
= KRdbExportQtSettings
| KRdbExportQtColors
| KRdbExportXftSettings
;
80 KConfig
_config( "kcmdisplayrc", KConfig::NoGlobals
);
81 KConfigGroup
config(&_config
, "X11");
83 // This key is written by the "colors" module.
84 bool exportKDEColors
= config
.readEntry("exportKDEColors", true);
86 flags
|= KRdbExportColors
;
89 // Write some Qt root property.
91 #ifndef __osf__ // this crashes under Tru64 randomly -- will fix later
92 QByteArray properties
;
93 QDataStream
d(&properties
, QIODevice::WriteOnly
);
94 d
.setVersion( 3 ); // Qt2 apps need this.
95 d
<< kapp
->palette() << KGlobalSettings::generalFont();
96 Atom a
= XInternAtom(QX11Info::display(), "_QT_DESKTOP_PROPERTIES", false);
98 // do it for all root windows - multihead support
99 int screen_count
= ScreenCount(QX11Info::display());
100 for (int i
= 0; i
< screen_count
; i
++)
101 XChangeProperty(QX11Info::display(), RootWindow(QX11Info::display(), i
),
102 a
, a
, 8, PropModeReplace
,
103 (unsigned char*) properties
.data(), properties
.size());
109 class StylePreview
: public QWidget
, public Ui::StylePreview
112 StylePreview(QWidget
*parent
= 0)
117 // Ensure that the user can't toy with the child widgets.
118 // Method borrowed from Qt's qtconfig.
119 QList
<QWidget
*> widgets
= findChildren
<QWidget
*>();
120 foreach (QWidget
* widget
, widgets
)
122 widget
->installEventFilter(this);
123 widget
->setFocusPolicy(Qt::NoFocus
);
127 bool eventFilter( QObject
* /* obj */, QEvent
* ev
)
131 case QEvent::MouseButtonPress
:
132 case QEvent::MouseButtonRelease
:
133 case QEvent::MouseButtonDblClick
:
134 case QEvent::MouseMove
:
135 case QEvent::KeyPress
:
136 case QEvent::KeyRelease
:
140 case QEvent::ContextMenu
:
141 return true; // ignore
150 KCMStyle::KCMStyle( QWidget
* parent
, const QVariantList
& )
151 : KCModule( KCMStyleFactory::componentData(), parent
), appliedStyle(NULL
)
153 setQuickHelp( i18n("<h1>Style</h1>"
154 "This module allows you to modify the visual appearance "
155 "of user interface elements, such as the widget style "
158 m_bStyleDirty
= false;
159 m_bEffectsDirty
= false;
161 KGlobal::dirs()->addResourceType("themes", "data", "kstyle/themes");
164 new KAboutData( I18N_NOOP("kcmstyle"), 0,
165 ki18n("KDE Style Module"),
166 0, KLocalizedString(), KAboutData::License_GPL
,
167 ki18n("(c) 2002 Karol Szwed, Daniel Molkentin"));
169 about
->addAuthor(ki18n("Karol Szwed"), KLocalizedString(), "gallium@kde.org");
170 about
->addAuthor(ki18n("Daniel Molkentin"), KLocalizedString(), "molkentin@kde.org");
171 about
->addAuthor(ki18n("Ralf Nolden"), KLocalizedString(), "nolden@kde.org");
172 setAboutData( about
);
174 // Setup pages and mainLayout
175 mainLayout
= new QVBoxLayout( this );
176 mainLayout
->setMargin(0);
178 tabWidget
= new QTabWidget( this );
179 mainLayout
->addWidget( tabWidget
);
182 page1Layout
= new QVBoxLayout( page1
);
186 //gbWidgetStyle = new QGroupBox( i18n("Widget Style"), page1 );
187 QWidget
* gbWidgetStyle
= new QWidget( page1
);
188 QVBoxLayout
*widgetLayout
= new QVBoxLayout(gbWidgetStyle
);
190 gbWidgetStyleLayout
= new QVBoxLayout
;
191 widgetLayout
->addLayout( gbWidgetStyleLayout
);
192 gbWidgetStyleLayout
->setAlignment( Qt::AlignTop
);
193 hbLayout
= new QHBoxLayout( );
194 hbLayout
->setObjectName( "hbLayout" );
196 QLabel
* label
=new QLabel(i18n("Widget style:"),this);
197 label
->setSizePolicy(QSizePolicy::Minimum
, QSizePolicy::Preferred
);
198 hbLayout
->addWidget( label
);
200 cbStyle
= new KComboBox( gbWidgetStyle
);
201 cbStyle
->setObjectName( "cbStyle" );
202 cbStyle
->setEditable( false );
203 cbStyle
->setSizePolicy(QSizePolicy::Expanding
, QSizePolicy::Preferred
);
204 hbLayout
->addWidget( cbStyle
);
205 label
->setBuddy(cbStyle
);
207 pbConfigStyle
= new QPushButton( i18n("Con&figure..."), gbWidgetStyle
);
208 pbConfigStyle
->setSizePolicy( QSizePolicy::Maximum
, QSizePolicy::Minimum
);
209 pbConfigStyle
->setEnabled( false );
210 hbLayout
->addWidget( pbConfigStyle
);
212 gbWidgetStyleLayout
->addLayout( hbLayout
);
214 lblStyleDesc
= new QLabel( gbWidgetStyle
);
215 gbWidgetStyleLayout
->addWidget( lblStyleDesc
);
217 QGroupBox
*gbPreview
= new QGroupBox( i18n( "Preview" ), page1
);
218 QVBoxLayout
*previewLayout
= new QVBoxLayout(gbPreview
);
219 previewLayout
->setMargin( 0 );
220 stylePreview
= new StylePreview( gbPreview
);
221 gbPreview
->layout()->addWidget( stylePreview
);
223 page1Layout
->addWidget( gbWidgetStyle
);
224 page1Layout
->addWidget( gbPreview
);
225 page1Layout
->addStretch();
227 connect( cbStyle
, SIGNAL(activated(int)), this, SLOT(styleChanged()) );
228 connect( cbStyle
, SIGNAL(activated(int)), this, SLOT(updateConfigButton()));
229 connect( pbConfigStyle
, SIGNAL(clicked()), this, SLOT(styleSpecificConfig()));
231 // Add Page2 (Effects)
232 // -------------------
234 QFormLayout
* page2Layout
= new QFormLayout( page2
);
236 comboGraphicEffectsLevel
= new KComboBox( page2
);
237 comboGraphicEffectsLevel
->setVisible(false);
238 comboGraphicEffectsLevel
->setObjectName( "cbGraphicEffectsLevel" );
239 comboGraphicEffectsLevel
->setEditable( false );
240 comboGraphicEffectsLevel
->addItem(i18n("Low display resolution and Low CPU"), KGlobalSettings::NoEffects
);
241 comboGraphicEffectsLevel
->addItem(i18n("High display resolution and Low CPU"), KGlobalSettings::GradientEffects
);
242 comboGraphicEffectsLevel
->addItem(i18n("Low display resolution and High CPU"), KGlobalSettings::SimpleAnimationEffects
);
243 comboGraphicEffectsLevel
->addItem(i18n("High display resolution and High CPU"), (int) (KGlobalSettings::SimpleAnimationEffects
| KGlobalSettings::GradientEffects
));
244 comboGraphicEffectsLevel
->addItem(i18n("Low display resolution and Very High CPU"), KGlobalSettings::ComplexAnimationEffects
);
245 comboGraphicEffectsLevel
->addItem(i18n("High display resolution and Very High CPU"), (int) (KGlobalSettings::ComplexAnimationEffects
| KGlobalSettings::GradientEffects
));
246 //page2Layout->addRow(i18nc("@label:listbox","Graphical User Interface:"), comboGraphicEffectsLevel);
248 comboToolbarIcons
= new QComboBox( page2
);
249 comboToolbarIcons
->setEditable( false );
250 comboToolbarIcons
->addItem( i18n("Icons Only") );
251 comboToolbarIcons
->addItem( i18n("Text Only") );
252 comboToolbarIcons
->addItem( i18n("Text Alongside Icons") );
253 comboToolbarIcons
->addItem( i18n("Text Under Icons") );
254 comboToolbarIcons
->setSizePolicy( QSizePolicy::Minimum
, QSizePolicy::Minimum
);
255 page2Layout
->addRow(i18nc("@label:listbox","Text pos&ition:"), comboToolbarIcons
);
257 cbIconsOnButtons
= new QCheckBox( i18nc("@option:check","Sho&w icons on buttons"), page2
);
258 page2Layout
->addRow(cbIconsOnButtons
);
260 connect(cbStyle
, SIGNAL(activated(int)), this, SLOT(setStyleDirty()));
261 connect( cbIconsOnButtons
, SIGNAL(toggled(bool)), this, SLOT(setEffectsDirty()));
262 connect( comboGraphicEffectsLevel
, SIGNAL(activated(int)), this, SLOT(setEffectsDirty()));
263 connect( comboToolbarIcons
, SIGNAL(activated(int)), this, SLOT(setEffectsDirty()));
267 // Insert the pages into the tabWidget
268 tabWidget
->addTab( page1
, i18nc("@title:tab","&Style"));
269 tabWidget
->addTab( page2
, i18nc("@title:tab","&Fine Tuning"));
274 KCMStyle::~KCMStyle()
276 qDeleteAll(styleEntries
);
280 void KCMStyle::updateConfigButton()
282 if (!styleEntries
[currentStyle()] || styleEntries
[currentStyle()]->configPage
.isEmpty()) {
283 pbConfigStyle
->setEnabled(false);
287 // We don't check whether it's loadable here -
288 // lets us report an error and not waste time
289 // loading things if the user doesn't click the button
290 pbConfigStyle
->setEnabled( true );
293 void KCMStyle::styleSpecificConfig()
295 QString libname
= styleEntries
[currentStyle()]->configPage
;
297 KLibrary
library(libname
, KCMStyleFactory::componentData());
298 if (!library
.load()) {
299 KMessageBox::detailedError(this,
300 i18n("There was an error loading the configuration dialog for this style."),
301 library
.errorString(),
302 i18n("Unable to Load Dialog"));
306 KLibrary::void_function_ptr allocPtr
= library
.resolveFunction("allocate_kstyle_config");
310 KMessageBox::detailedError(this,
311 i18n("There was an error loading the configuration dialog for this style."),
312 library
.errorString(),
313 i18n("Unable to Load Dialog"));
317 //Create the container dialog
318 StyleConfigDialog
* dial
= new StyleConfigDialog(this, styleEntries
[currentStyle()]->name
);
319 dial
->showButtonSeparator(true);
321 typedef QWidget
*(* factoryRoutine
)( QWidget
* parent
);
323 //Get the factory, and make the widget.
324 factoryRoutine factory
= (factoryRoutine
)(allocPtr
); //Grmbl. So here I am on my
325 //"never use C casts" moralizing streak, and I find that one can't go void* -> function ptr
326 //even with a reinterpret_cast.
328 QWidget
* pluginConfig
= factory( dial
);
331 dial
->setMainWidget( pluginConfig
);
333 //..and connect it to the wrapper
334 connect(pluginConfig
, SIGNAL(changed(bool)), dial
, SLOT(setDirty(bool)));
335 connect(dial
, SIGNAL(defaults()), pluginConfig
, SLOT(defaults()));
336 connect(dial
, SIGNAL(save()), pluginConfig
, SLOT(save()));
338 if (dial
->exec() == QDialog::Accepted
&& dial
->isDirty() ) {
339 // Force re-rendering of the preview, to apply settings
340 switchStyle(currentStyle(), true);
342 //For now, ask all KDE apps to recreate their styles to apply the setitngs
343 KGlobalSettings::self()->emitChange(KGlobalSettings::StyleChanged
);
345 // We call setStyleDirty here to make sure we force style re-creation
352 void KCMStyle::changeEvent( QEvent
*event
)
354 KCModule::changeEvent( event
);
355 if ( event
->type() == QEvent::PaletteChange
) {
356 // Force re-rendering of the preview, to apply new palette
357 switchStyle(currentStyle(), true);
361 void KCMStyle::load()
363 KConfig
config( "kdeglobals", KConfig::FullConfig
);
366 loadEffects( config
);
368 m_bStyleDirty
= false;
369 m_bEffectsDirty
= false;
370 //Enable/disable the button for the initial style
371 updateConfigButton();
373 emit
changed( false );
377 void KCMStyle::save()
379 // Don't do anything if we don't need to.
380 if ( !( m_bStyleDirty
| m_bEffectsDirty
) )
384 KConfig
_config( "kdeglobals" );
385 KConfigGroup
config(&_config
, "KDE");
388 config
.writeEntry( "ShowIconsOnPushButtons", cbIconsOnButtons
->isChecked(), KConfig::Normal
|KConfig::Global
);
389 KConfigGroup
g( &_config
, "KDE-Global GUI Settings" );
390 g
.writeEntry( "GraphicEffectsLevel", comboGraphicEffectsLevel
->itemData(comboGraphicEffectsLevel
->currentIndex()), KConfig::Normal
|KConfig::Global
);
392 KConfigGroup
generalGroup(&_config
, "General");
393 generalGroup
.writeEntry("widgetStyle", currentStyle());
395 KConfigGroup
toolbarStyleGroup(&_config
, "Toolbar style");
397 switch( comboToolbarIcons
->currentIndex() )
399 case 0: tbIcon
= "IconOnly"; break;
400 case 1: tbIcon
= "TextOnly"; break;
401 case 2: tbIcon
= "TextBesideIcon"; break;
403 case 3: tbIcon
= "TextUnderIcon"; break;
405 toolbarStyleGroup
.writeEntry("ToolButtonStyle", tbIcon
, KConfig::Normal
|KConfig::Global
);
408 // Export the changes we made to qtrc, and update all qt-only
409 // applications on the fly, ensuring that we still follow the user's
410 // export fonts/colors settings.
411 if (m_bStyleDirty
| m_bEffectsDirty
) // Export only if necessary
413 uint flags
= KRdbExportQtSettings
;
414 KConfig
_kconfig( "kcmdisplayrc", KConfig::NoGlobals
);
415 KConfigGroup
kconfig(&_kconfig
, "X11");
416 bool exportKDEColors
= kconfig
.readEntry("exportKDEColors", true);
418 flags
|= KRdbExportColors
;
422 // Now allow KDE apps to reconfigure themselves.
424 KGlobalSettings::self()->emitChange(KGlobalSettings::StyleChanged
);
426 if ( m_bEffectsDirty
) {
427 KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged
);
428 // ##### FIXME - Doesn't apply all settings correctly due to bugs in
429 // KApplication/KToolbar
430 KGlobalSettings::self()->emitChange(KGlobalSettings::ToolbarStyleChanged
);
433 // Send signal to all kwin instances
434 QDBusMessage message
=
435 QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
436 QDBusConnection::sessionBus().send(message
);
441 m_bStyleDirty
= false;
442 m_bEffectsDirty
= false;
443 emit
changed( false );
447 bool KCMStyle::findStyle( const QString
& str
, int& combobox_item
)
449 StyleEntry
* se
= styleEntries
[str
.toLower()];
451 QString name
= se
? se
->name
: str
;
456 for( int i
= 0; i
< cbStyle
->count(); i
++ )
458 if ( cbStyle
->itemText(i
) == name
)
469 void KCMStyle::defaults()
471 // Select default style
475 found
= findStyle( KStyle::defaultStyle(), item
);
477 found
= findStyle( "plastique", item
);
479 found
= findStyle( "windows", item
);
481 found
= findStyle( "platinum", item
);
483 found
= findStyle( "motif", item
);
485 cbStyle
->setCurrentIndex( item
);
487 m_bStyleDirty
= true;
488 switchStyle( currentStyle() ); // make resets visible
491 comboToolbarIcons
->setCurrentIndex(0);
492 cbIconsOnButtons
->setChecked(true);
493 comboGraphicEffectsLevel
->setCurrentIndex(comboGraphicEffectsLevel
->findData(((int) KGlobalSettings::graphicEffectsLevelDefault())));
497 void KCMStyle::setEffectsDirty()
499 m_bEffectsDirty
= true;
503 void KCMStyle::setStyleDirty()
505 m_bStyleDirty
= true;
509 // ----------------------------------------------------------------
510 // All the Style Switching / Preview stuff
511 // ----------------------------------------------------------------
513 void KCMStyle::loadStyle( KConfig
& config
)
516 // Create a dictionary of WidgetStyle to Name and Desc. mappings,
517 // as well as the config page info
518 qDeleteAll(styleEntries
);
519 styleEntries
.clear();
521 QString strWidgetStyle
;
522 QStringList list
= KGlobal::dirs()->findAllResources("themes", "*.themerc",
523 KStandardDirs::Recursive
|
524 KStandardDirs::NoDuplicates
);
525 for (QStringList::iterator it
= list
.begin(); it
!= list
.end(); ++it
)
527 KConfig
config( *it
, KConfig::SimpleConfig
);
528 if ( !(config
.hasGroup("KDE") && config
.hasGroup("Misc")) )
531 KConfigGroup configGroup
= config
.group("KDE");
533 strWidgetStyle
= configGroup
.readEntry("WidgetStyle");
534 if (strWidgetStyle
.isNull())
537 // We have a widgetstyle, so lets read the i18n entries for it...
538 StyleEntry
* entry
= new StyleEntry
;
539 configGroup
= config
.group("Misc");
540 entry
->name
= configGroup
.readEntry("Name");
541 entry
->desc
= configGroup
.readEntry("Comment", i18n("No description available."));
542 entry
->configPage
= configGroup
.readEntry("ConfigPage", QString());
544 // Check if this style should be shown
545 configGroup
= config
.group("Desktop Entry");
546 entry
->hidden
= configGroup
.readEntry("Hidden", false);
548 // Insert the entry into our dictionary.
549 styleEntries
.insert(strWidgetStyle
.toLower(), entry
);
552 // Obtain all style names
553 QStringList allStyles
= QStyleFactory::keys();
555 // Get translated names, remove all hidden style entries.
558 for (QStringList::iterator it
= allStyles
.begin(); it
!= allStyles
.end(); ++it
)
560 QString id
= (*it
).toLower();
562 if ( (entry
= styleEntries
[id
]) != 0 )
564 // Do not add hidden entries
568 styles
+= entry
->name
;
570 nameToStyleKey
[entry
->name
] = id
;
574 styles
+= (*it
); //Fall back to the key (but in original case)
575 nameToStyleKey
[*it
] = id
;
579 // Sort the style list, and add it to the combobox
581 cbStyle
->addItems( styles
);
583 // Find out which style is currently being used
584 KConfigGroup configGroup
= config
.group( "General" );
585 QString defaultStyle
= KStyle::defaultStyle();
586 QString cfgStyle
= configGroup
.readEntry( "widgetStyle", defaultStyle
);
588 // Select the current style
589 // Do not use cbStyle->listBox() as this may be NULL for some styles when
590 // they use QPopupMenus for the drop-down list!
592 // ##### Since Trolltech likes to seemingly copy & paste code,
593 // QStringList::findItem() doesn't have a Qt::StringComparisonMode field.
594 // We roll our own (yuck)
595 cfgStyle
= cfgStyle
.toLower();
597 for( int i
= 0; i
< cbStyle
->count(); i
++ )
599 QString id
= nameToStyleKey
[cbStyle
->itemText(i
)];
601 if ( id
== cfgStyle
) // ExactMatch
603 else if ( id
.contains( cfgStyle
) )
605 else if ( id
.contains( QApplication::style()->metaObject()->className() ) )
609 cbStyle
->setCurrentIndex( item
);
610 m_bStyleDirty
= false;
612 switchStyle( currentStyle() ); // make resets visible
615 QString
KCMStyle::currentStyle()
617 return nameToStyleKey
[cbStyle
->currentText()];
621 void KCMStyle::styleChanged()
623 switchStyle( currentStyle() );
627 void KCMStyle::switchStyle(const QString
& styleName
, bool force
)
629 // Don't flicker the preview if the same style is chosen in the cb
630 if (!force
&& appliedStyle
&& appliedStyle
->objectName() == styleName
)
633 // Create an instance of the new style...
634 QStyle
* style
= QStyleFactory::create(styleName
);
638 // Prevent Qt from wrongly caching radio button images
639 QPixmapCache::clear();
641 setStyleRecursive( stylePreview
, style
);
643 // this flickers, but reliably draws the widgets correctly.
644 stylePreview
->resize( stylePreview
->sizeHint() );
647 appliedStyle
= style
;
649 // Set the correct style description
650 StyleEntry
* entry
= styleEntries
[ styleName
];
652 desc
= i18n("Description: %1", entry
? entry
->desc
: i18n("No description available.") );
653 lblStyleDesc
->setText( desc
);
656 void KCMStyle::setStyleRecursive(QWidget
* w
, QStyle
* s
)
658 // Don't let broken styles kill the palette
659 // for other styles being previewed. (e.g SGI style)
660 w
->setPalette(QPalette());
662 QPalette
newPalette(KGlobalSettings::createApplicationPalette());
663 s
->polish( newPalette
);
664 w
->setPalette(newPalette
);
666 // Apply the new style.
669 // Recursively update all children.
670 const QObjectList children
= w
->children();
672 // Apply the style to each child widget.
673 foreach (QObject
* child
, children
)
675 if (child
->isWidgetType())
676 setStyleRecursive((QWidget
*) child
, s
);
680 // ----------------------------------------------------------------
681 // All the Effects stuff
682 // ----------------------------------------------------------------
684 void KCMStyle::loadEffects( KConfig
& config
)
686 // KDE's Part via KConfig
687 KConfigGroup configGroup
= config
.group("Toolbar style");
689 QString tbIcon
= configGroup
.readEntry("ToolButtonStyle", "TextUnderIcon");
690 if (tbIcon
== "TextOnly")
691 comboToolbarIcons
->setCurrentIndex(1);
692 else if (tbIcon
== "TextBesideIcon")
693 comboToolbarIcons
->setCurrentIndex(2);
694 else if (tbIcon
== "TextUnderIcon")
695 comboToolbarIcons
->setCurrentIndex(3);
697 comboToolbarIcons
->setCurrentIndex(0);
699 configGroup
= config
.group("KDE");
700 cbIconsOnButtons
->setChecked(configGroup
.readEntry("ShowIconsOnPushButtons", true));
702 KConfigGroup graphicConfigGroup
= config
.group("KDE-Global GUI Settings");
703 comboGraphicEffectsLevel
->setCurrentIndex(comboGraphicEffectsLevel
->findData(graphicConfigGroup
.readEntry("GraphicEffectsLevel", ((int) KGlobalSettings::graphicEffectsLevel()))));
705 m_bEffectsDirty
= false;
708 void KCMStyle::addWhatsThis()
711 cbStyle
->setWhatsThis( i18n("Here you can choose from a list of"
712 " predefined widget styles (e.g. the way buttons are drawn) which"
713 " may or may not be combined with a theme (additional information"
714 " like a marble texture or a gradient).") );
715 stylePreview
->setWhatsThis( i18n("This area shows a preview of the currently selected style "
716 "without having to apply it to the whole desktop.") );
718 page2
->setWhatsThis( i18n("This page allows you to enable various widget style effects. "
719 "For best performance, it is advisable to disable all effects.") );
720 comboToolbarIcons
->setWhatsThis( i18n( "<p><b>Icons only:</b> Shows only icons on toolbar buttons. "
721 "Best option for low resolutions.</p>"
722 "<p><b>Text only: </b>Shows only text on toolbar buttons.</p>"
723 "<p><b>Text alongside icons: </b> Shows icons and text on toolbar buttons. "
724 "Text is aligned alongside the icon.</p>"
725 "<b>Text under icons: </b> Shows icons and text on toolbar buttons. "
726 "Text is aligned below the icon.") );
727 cbIconsOnButtons
->setWhatsThis( i18n( "If you enable this option, KDE Applications will "
728 "show small icons alongside some important buttons.") );
729 comboGraphicEffectsLevel
->setWhatsThis( i18n( "If you enable this option, KDE Applications will "
730 "run internal animations.") );
733 #include "kcmstyle.moc"
735 // vim: set noet ts=4: