mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
prioritize cleanlooks style
because the default in QGuiPlatformPlugin is cleanlooks Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ad9087f180
commit
a2ef6f2987
2 changed files with 13 additions and 14 deletions
|
@ -78,8 +78,8 @@ void QProxyStylePrivate::ensureBaseStyle() const
|
|||
if (!baseStyle) // Use application desktop style
|
||||
baseStyle = QStyleFactory::create(QApplicationPrivate::desktopStyleKey());
|
||||
|
||||
if (!baseStyle) // Fallback to windows style
|
||||
baseStyle = QStyleFactory::create(QLatin1String("windows"));
|
||||
if (!baseStyle) // Fallback to cleanlooks style
|
||||
baseStyle = QStyleFactory::create(QLatin1String("cleanlooks"));
|
||||
|
||||
baseStyle->setProxy(const_cast<QProxyStyle*>(q));
|
||||
baseStyle->setParent(const_cast<QProxyStyle*>(q)); // Take ownership
|
||||
|
|
|
@ -46,10 +46,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, stylesloader, (QString::fromLatin1("/s
|
|||
styles are either built-in or dynamically loaded from a style
|
||||
plugin (see QStylePlugin).
|
||||
|
||||
The valid keys can be retrieved using the keys()
|
||||
function. Typically they include "windows", "motif",
|
||||
"plastique" and "cleanlooks". Note that keys are case
|
||||
insensitive.
|
||||
The valid keys can be retrieved using the keys() function.
|
||||
Typically they include "windows" and "cleanlooks". Note that keys
|
||||
are case-insensitive.
|
||||
|
||||
\sa QStyle
|
||||
*/
|
||||
|
@ -67,16 +66,16 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, stylesloader, (QString::fromLatin1("/s
|
|||
*/
|
||||
QStyle *QStyleFactory::create(const QString& key)
|
||||
{
|
||||
#ifndef QT_NO_STYLE_WINDOWS
|
||||
if (key.compare(QLatin1String("Windows"), Qt::CaseInsensitive) == 0) {
|
||||
return new QWindowsStyle();
|
||||
}
|
||||
#endif
|
||||
#ifndef QT_NO_STYLE_CLEANLOOKS
|
||||
if (key.compare(QLatin1String("Cleanlooks"), Qt::CaseInsensitive) == 0) {
|
||||
return new QCleanlooksStyle();
|
||||
}
|
||||
#endif
|
||||
#ifndef QT_NO_STYLE_WINDOWS
|
||||
if (key.compare(QLatin1String("Windows"), Qt::CaseInsensitive) == 0) {
|
||||
return new QWindowsStyle();
|
||||
}
|
||||
#endif
|
||||
#if !defined(QT_NO_LIBRARY)
|
||||
if (QStylePlugin *plugin = qobject_cast<QStylePlugin*>(stylesloader()->instance(key))) {
|
||||
QStyle *ret = plugin->create(key);
|
||||
|
@ -105,11 +104,11 @@ QStringList QStyleFactory::keys()
|
|||
#else
|
||||
QStringList list;
|
||||
#endif
|
||||
#ifndef QT_NO_STYLE_WINDOWS
|
||||
list << QLatin1String("Windows");
|
||||
#endif
|
||||
#ifndef QT_NO_STYLE_CLEANLOOKS
|
||||
list << QLatin1String("Cleanlooks");
|
||||
#endif
|
||||
#ifndef QT_NO_STYLE_WINDOWS
|
||||
list << QLatin1String("Windows");
|
||||
#endif
|
||||
return list;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue