diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-11-02 12:36:29 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-11-03 23:08:39 -0800 |
commit | 814cda718365823654c7d13f2e24f31ac58ddb45 (patch) | |
tree | 3105952e46c724795ff439accd41f569b333a03f /desktop-widgets/tab-widgets/TabDiveInformation.cpp | |
parent | 7d18a525f178c2c47ec72a96fbda92d5595f95d9 (diff) | |
download | subsurface-814cda718365823654c7d13f2e24f31ac58ddb45.tar.gz |
desktop: generalize the colorization of the tab widget
Instead of doing it just for the Information tab, do it for all of the tabs.
There's still room for improvement. But this certainly feels more consistent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveInformation.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveInformation.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index 057bd3ad6..b9b504403 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -249,23 +249,15 @@ void TabDiveInformation::updateUi() QStringList colors = { "mediumblue", "lightblue", "black" }; // If using dark theme, set color appropriately QString colorText = colors[prefs.headerstyle_color]; - QString lastpart = colorText + " ;}"; - QString CSSLabelcolor = "QLabel { color: " + lastpart; - QString CSSTitlecolor = "QGroupBox::title { color: " + lastpart ; - QString CSSSetSmallLabel = "QLabel { color: "; + QString CSSSetSmallLabel = "QLabel:enabled { color: "; CSSSetSmallLabel.append(colorText + "; font-size: "); CSSSetSmallLabel.append(QString::number((int)(0.5 + ui->diveHeadingLabel->geometry().height() * 0.66)) + "px;}"); - ui->scrollAreaWidgetContents_3->setStyleSheet(CSSTitlecolor); - ui->diveHeadingLabel->setStyleSheet(CSSLabelcolor); - ui->gasHeadingLabel->setStyleSheet(CSSLabelcolor); - ui->environmentHeadingLabel->setStyleSheet(CSSLabelcolor); - ui->groupBox_visibility->setStyleSheet(CSSSetSmallLabel); - ui->groupBox_current->setStyleSheet(CSSSetSmallLabel); - ui->groupBox_wavesize->setStyleSheet(CSSSetSmallLabel); - ui->groupBox_surge->setStyleSheet(CSSSetSmallLabel); - ui->groupBox_chill->setStyleSheet(CSSSetSmallLabel); - ui->salinityOverWrittenIcon->setToolTip(CSSSetSmallLabel); - + ui->groupBox_visibility->setStyleSheet(ui->groupBox_visibility->styleSheet() + CSSSetSmallLabel); + ui->groupBox_current->setStyleSheet(ui->groupBox_current->styleSheet() + CSSSetSmallLabel); + ui->groupBox_wavesize->setStyleSheet(ui->groupBox_wavesize->styleSheet() + CSSSetSmallLabel); + ui->groupBox_surge->setStyleSheet(ui->groupBox_surge->styleSheet() + CSSSetSmallLabel); + ui->groupBox_chill->setStyleSheet(ui->groupBox_chill->styleSheet() + CSSSetSmallLabel); + ui->salinityOverWrittenIcon->setToolTip(ui->salinityOverWrittenIcon->styleSheet() + CSSSetSmallLabel); } // From the index of the water type combo box, set the dive->salinity to an appropriate value |