diff options
Diffstat (limited to 'src-qt5/core')
3 files changed, 40 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss b/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss new file mode 100644 index 00000000..265ff20c --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss @@ -0,0 +1,30 @@ +/* SCROLLBARS (NOTE: Changing 1 subcontrol means you have to change all of them)*/ +QScrollBar{ + background: palette(alternate-base); +} +QScrollBar:horizontal{ + margin: 0px 0px 0px 0px; +} +QScrollBar:vertical{ + margin: 0px 0px 0px 0px; +} +QScrollBar::handle{ + background: palette(base); + border: 1px solid transparent; + border-radius: 7px; +} +QScrollBar::handle:hover, QScrollBar::add-line:hover, QScrollBar::sub-line:hover{ + background: palette(highlight); +} +QScrollBar::add-line{ +subcontrol-origin: none; +} +QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical{ +height: 0px; +} +QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal{ +width: 0px; +} +QScrollBar::sub-line{ +subcontrol-origin: none; +} diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index 9cb755fb..a65798de 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -16,6 +16,8 @@ #include <QFile> #include <QFileSystemWatcher> +#include <stdlib.h> + #include <lthemeengine/lthemeengine.h> #include "lthemeengineplatformtheme.h" #if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) && !defined(QT_NO_DBUS) @@ -138,12 +140,16 @@ void lthemeenginePlatformTheme::applySettings(){ #endif QGuiApplication::setFont(m_generalFont); //apply font QIcon::setThemeName(m_iconTheme); //apply icons + setenv("X_CURSOR_THEME", m_cursorTheme.toLocal8Bit().data(), 1); + //qDebug() << "Icon Theme Change:" << m_iconTheme << QIcon::themeSearchPaths(); if(m_customPalette && m_usePalette){ QGuiApplication::setPalette(*m_customPalette); } //apply palette #ifdef QT_WIDGETS_LIB if(hasWidgets()){ + QEvent et(QEvent::ThemeChange); + QEvent ec(QEvent::CursorChange); foreach (QWidget *w, qApp->allWidgets()){ - QEvent e(QEvent::ThemeChange); - QApplication::sendEvent(w, &e); + QApplication::sendEvent(w, &et); + QApplication::sendEvent(w, &ec); } } #endif @@ -180,6 +186,7 @@ void lthemeenginePlatformTheme::readSettings(){ QString schemePath = settings.value("color_scheme_path","airy").toString(); m_customPalette = new QPalette(loadColorScheme(schemePath)); } + m_cursorTheme = settings.value("cursor_theme","").toString(); m_iconTheme = settings.value("icon_theme", "material-design-light").toString(); settings.endGroup(); settings.beginGroup("Fonts"); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h index 17323328..3bc9ebbf 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h @@ -66,7 +66,7 @@ private: #endif QString loadStyleSheets(const QStringList &paths); QPalette loadColorScheme(QString filePath); - QString m_style, m_iconTheme, m_userStyleSheet, m_prevStyleSheet; + QString m_style, m_iconTheme, m_userStyleSheet, m_cursorTheme; QPalette *m_customPalette = nullptr; QFont m_generalFont, m_fixedFont; int m_doubleClickInterval; |