aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-02 21:00:16 +0000
committerWeblate <noreply@weblate.org>2017-08-02 21:00:16 +0000
commit3d511a0f8285088eba24cb22b15cda039d27f6a0 (patch)
tree2eccf8b44a5e9862e6733880c37d57a9af74b41a /src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
parentTranslated using Weblate (Spanish) (diff)
parentFix up the screensaver animation crashes *again*. (diff)
downloadlumina-3d511a0f8285088eba24cb22b15cda039d27f6a0.tar.gz
lumina-3d511a0f8285088eba24cb22b15cda039d27f6a0.tar.bz2
lumina-3d511a0f8285088eba24cb22b15cda039d27f6a0.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp15
1 files changed, 6 insertions, 9 deletions
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 8a8e86d0..9cce5a6e 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/paletteeditdialog.cpp
@@ -37,15 +37,12 @@ QPalette PaletteEditDialog::selectedPalette() const{
void PaletteEditDialog::setPalette(const QPalette &palette){
for(int i = 0; i < QPalette::NColorRoles; i++){
- if(!m_ui->tableWidget->item(i,0))
- m_ui->tableWidget->setItem(i, 0, new QTableWidgetItem());
- if(!m_ui->tableWidget->item(i,1))
- m_ui->tableWidget->setItem(i, 1, new QTableWidgetItem());
- if(!m_ui->tableWidget->item(i,2))
- m_ui->tableWidget->setItem(i, 2, new QTableWidgetItem());
- m_ui->tableWidget->item(i,0)->setBackgroundColor(palette.color(QPalette::Active, QPalette::ColorRole(i)));
- m_ui->tableWidget->item(i,1)->setBackgroundColor(palette.color(QPalette::Inactive, QPalette::ColorRole(i)));
- m_ui->tableWidget->item(i,2)->setBackgroundColor(palette.color(QPalette::Disabled, QPalette::ColorRole(i)));
+ if(!m_ui->tableWidget->item(i,0)){ m_ui->tableWidget->setItem(i, 0, new QTableWidgetItem()); }
+ if(!m_ui->tableWidget->item(i,1)){ m_ui->tableWidget->setItem(i, 1, new QTableWidgetItem()); }
+ if(!m_ui->tableWidget->item(i,2)){ m_ui->tableWidget->setItem(i, 2, new QTableWidgetItem()); }
+ m_ui->tableWidget->item(i,0)->setBackgroundColor(palette.color(QPalette::Active, QPalette::ColorRole(i)));
+ m_ui->tableWidget->item(i,1)->setBackgroundColor(palette.color(QPalette::Inactive, QPalette::ColorRole(i)));
+ 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");
bgstack15