aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/libLumina/LDesktopUtils.cpp2
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp14
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp6
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp
index fa272e8e..79151273 100644
--- a/src-qt5/core/libLumina/LDesktopUtils.cpp
+++ b/src-qt5/core/libLumina/LDesktopUtils.cpp
@@ -14,7 +14,7 @@
#include "LuminaThemes.h"
QString LDesktopUtils::LuminaDesktopVersion(){
- QString ver = "1.4.2";
+ QString ver = "1.4.3";
#ifdef GIT_VERSION
ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) );
#endif
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 a6e05000..621aa0ac 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
@@ -310,13 +310,13 @@ QPalette lthemeenginePlatformTheme::loadColorScheme(QString filePath){
QStringList inactiveColors = settings.value("inactive_colors").toStringList();
QStringList disabledColors = settings.value("disabled_colors").toStringList();
settings.endGroup();
- if(activeColors.count() == QPalette::NColorRoles && inactiveColors.count() == QPalette::NColorRoles && disabledColors.count() == QPalette::NColorRoles){
- for (int i = 0; i < QPalette::NColorRoles; i++){
- QPalette::ColorRole role = QPalette::ColorRole(i);
- customPalette.setColor(QPalette::Active, role, QColor(activeColors.at(i)));
- customPalette.setColor(QPalette::Inactive, role, QColor(inactiveColors.at(i)));
- customPalette.setColor(QPalette::Disabled, role, QColor(disabledColors.at(i)));
- }
+ if(activeColors.count() <= QPalette::NColorRoles && inactiveColors.count() <= QPalette::NColorRoles && disabledColors.count() <= QPalette::NColorRoles){
+ for (int i = 0; i < QPalette::NColorRoles && i<activeColors.count(); i++){
+ QPalette::ColorRole role = QPalette::ColorRole(i);
+ customPalette.setColor(QPalette::Active, role, QColor(activeColors.at(i)));
+ customPalette.setColor(QPalette::Inactive, role, QColor(inactiveColors.at(i)));
+ customPalette.setColor(QPalette::Disabled, role, QColor(disabledColors.at(i)));
+ }
}
else{ customPalette = *QPlatformTheme::palette(SystemPalette); } //load fallback palette
return customPalette;
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
index 98f9c865..bc8ff355 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
@@ -253,8 +253,8 @@ QPalette AppearancePage::loadColorScheme(const QString &filePath){
QStringList inactiveColors = settings.value("inactive_colors").toStringList();
QStringList disabledColors = settings.value("disabled_colors").toStringList();
settings.endGroup();
- if(activeColors.count() == QPalette::NColorRoles && inactiveColors.count() == QPalette::NColorRoles && disabledColors.count() == QPalette::NColorRoles){
- for (int i = 0; i < QPalette::NColorRoles; i++){
+ if(activeColors.count() <= QPalette::NColorRoles && inactiveColors.count() <= QPalette::NColorRoles && disabledColors.count() <= QPalette::NColorRoles){
+ for (int i = 0; i < QPalette::NColorRoles && i<activeColors.count(); i++){
QPalette::ColorRole role = QPalette::ColorRole(i);
customPalette.setColor(QPalette::Active, role, QColor(activeColors.at(i)));
customPalette.setColor(QPalette::Inactive, role, QColor(inactiveColors.at(i)));
@@ -263,7 +263,7 @@ QPalette AppearancePage::loadColorScheme(const QString &filePath){
}
else{
customPalette = palette(); //load fallback palette
- }
+ }
return customPalette;
}
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
index 9cce5a6e..6c5b0665 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
@@ -45,7 +45,7 @@ void PaletteEditDialog::setPalette(const QPalette &palette){
m_ui->tableWidget->item(i,2)->setBackgroundColor(palette.color(QPalette::Disabled, QPalette::ColorRole(i)));
}
QStringList labels;
- labels << tr("Window text") << tr("Button background") << tr("Bright") << tr("Less bright") << tr("Dark") << tr("Less dark") << tr("Normal text") << tr("Bright text") << tr("Button text") << tr("Normal background") << tr("Window") << tr("Shadow") << tr("Highlight") << tr("Highlighted text") << tr("Link") << tr("Visited link") << tr("Alternate background") << tr("Default") << tr("Tooltip background") << tr("Tooltip text");
+ labels << tr("Window text") << tr("Button background") << tr("Bright") << tr("Less bright") << tr("Dark") << tr("Less dark") << tr("Normal text") << tr("Bright text") << tr("Button text") << tr("Normal background") << tr("Window") << tr("Shadow") << tr("Highlight") << tr("Highlighted text") << tr("Link") << tr("Visited link") << tr("Alternate background") << tr("Default") << tr("Tooltip background") << tr("Tooltip text") << tr("Placeholder text");
m_ui->tableWidget->setVerticalHeaderLabels(labels);
}
bgstack15