|
|
@ -43,6 +43,7 @@
|
|
|
|
#include <QDir>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QFileSystemWatcher>
|
|
|
|
#include <QFileSystemWatcher>
|
|
|
|
|
|
|
|
#include <QStyle>
|
|
|
|
#include "qiconloader_p.h"
|
|
|
|
#include "qiconloader_p.h"
|
|
|
|
|
|
|
|
|
|
|
|
LXQtPlatformTheme::LXQtPlatformTheme():
|
|
|
|
LXQtPlatformTheme::LXQtPlatformTheme():
|
|
|
@ -157,7 +158,11 @@ void LXQtPlatformTheme::onSettingsChanged() {
|
|
|
|
loadSettings(); // reload the config file
|
|
|
|
loadSettings(); // reload the config file
|
|
|
|
|
|
|
|
|
|
|
|
if(style_ != oldStyle) // the widget style is changed
|
|
|
|
if(style_ != oldStyle) // the widget style is changed
|
|
|
|
qApp->setStyle(style_); // ask Qt5 to apply the new style
|
|
|
|
{
|
|
|
|
|
|
|
|
// ask Qt5 to apply the new style
|
|
|
|
|
|
|
|
if (qobject_cast<QApplication *>(QCoreApplication::instance()))
|
|
|
|
|
|
|
|
QApplication::setStyle(style_);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(iconTheme_ != oldIconTheme) { // the icon theme is changed
|
|
|
|
if(iconTheme_ != oldIconTheme) { // the icon theme is changed
|
|
|
|
QIconLoader::instance()->updateSystemTheme(); // this is a private internal API of Qt5.
|
|
|
|
QIconLoader::instance()->updateSystemTheme(); // this is a private internal API of Qt5.
|
|
|
@ -198,12 +203,15 @@ bool LXQtPlatformTheme::usePlatformNativeDialog(DialogType type) const {
|
|
|
|
QPlatformDialogHelper *LXQtPlatformTheme::createPlatformDialogHelper(DialogType type) const {
|
|
|
|
QPlatformDialogHelper *LXQtPlatformTheme::createPlatformDialogHelper(DialogType type) const {
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
const QPalette *LXQtPlatformTheme::palette(Palette type) const {
|
|
|
|
const QPalette *LXQtPlatformTheme::palette(Palette type) const {
|
|
|
|
return new QPalette();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
if (type == QPlatformTheme::SystemPalette)
|
|
|
|
|
|
|
|
// the default constructor uses the default palette
|
|
|
|
|
|
|
|
return new QPalette;
|
|
|
|
|
|
|
|
return QPlatformTheme::palette(type);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const QFont *LXQtPlatformTheme::font(Font type) const {
|
|
|
|
const QFont *LXQtPlatformTheme::font(Font type) const {
|
|
|
|
// qDebug() << "font()" << type << SystemFont;
|
|
|
|
// qDebug() << "font()" << type << SystemFont;
|
|
|
@ -250,7 +258,7 @@ QVariant LXQtPlatformTheme::themeHint(ThemeHint hint) const {
|
|
|
|
case ItemViewActivateItemOnSingleClick:
|
|
|
|
case ItemViewActivateItemOnSingleClick:
|
|
|
|
return QVariant(singleClickActivate_);
|
|
|
|
return QVariant(singleClickActivate_);
|
|
|
|
case SystemIconThemeName:
|
|
|
|
case SystemIconThemeName:
|
|
|
|
qDebug() << "iconTheme" << iconTheme_;
|
|
|
|
// qDebug() << "iconTheme" << iconTheme_;
|
|
|
|
return iconTheme_;
|
|
|
|
return iconTheme_;
|
|
|
|
case SystemIconFallbackThemeName:
|
|
|
|
case SystemIconFallbackThemeName:
|
|
|
|
return "hicolor";
|
|
|
|
return "hicolor";
|
|
|
|