From be3190db8a14fc51d88c65f5359b9b7787acd2a7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 4 Nov 2020 14:29:48 -0800 Subject: revert preference settings for title color Because of subsequent changes there is no clean way to just revert the changes introduced in commit 8b36cf1051 ("desktop: offer different colors for info tab titles"), so this manually removes the parts we don't need anymore. This also restores a tooltip value that was inadvertantly removed in that commit. Signed-off-by: Dirk Hohndel --- .../preferences/preferences_defaults.cpp | 3 - .../preferences/preferences_defaults.ui | 73 ---------------------- desktop-widgets/tab-widgets/TabDiveInformation.cpp | 1 + desktop-widgets/tab-widgets/maintab.cpp | 3 +- 4 files changed, 2 insertions(+), 78 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp index 3fba8e1b8..ca1b51acb 100644 --- a/desktop-widgets/preferences/preferences_defaults.cpp +++ b/desktop-widgets/preferences/preferences_defaults.cpp @@ -24,7 +24,6 @@ PreferencesDefaults::~PreferencesDefaults() void PreferencesDefaults::refreshSettings() { - prefs.headerstyle_color == BLACK ? ui->black_text->setChecked(true) : (prefs.headerstyle_color == LIGHTBLUE ? ui->lightblue_text->setChecked(true) : ui->mediumblue_text->setChecked(true)); ui->font->setCurrentFont(qPrefDisplay::divelist_font()); ui->fontsize->setValue(qPrefDisplay::font_size()); ui->velocitySlider->setValue(qPrefDisplay::animation_speed()); @@ -36,6 +35,4 @@ void PreferencesDefaults::syncSettings() qPrefDisplay::set_divelist_font(ui->font->currentFont().toString()); qPrefDisplay::set_font_size(ui->fontsize->value()); qPrefDisplay::set_animation_speed(ui->velocitySlider->value()); - qPrefDisplay::set_headerstyle_color(ui->black_text->isChecked() ? BLACK : (ui->lightblue_text->isChecked() ? LIGHTBLUE : MEDIUMBLUE)); - } diff --git a/desktop-widgets/preferences/preferences_defaults.ui b/desktop-widgets/preferences/preferences_defaults.ui index b6104b256..030bb77d6 100644 --- a/desktop-widgets/preferences/preferences_defaults.ui +++ b/desktop-widgets/preferences/preferences_defaults.ui @@ -120,77 +120,6 @@ - - - Header text colors - - - - 5 - - - - - - - - - true - - - Depending on the display mode, sometimes the blue text used in headers in the various information panes is not clearly visible. Select a color that fits the current theme of your computer. For dark mode, select either Light Blue or Black (rendered white using a dark theme). The default is Medium Blue. - - - - - - - - - - - Medium Blue - - - - - - - - Light Blue - - - - - - - - Black - - - - - - - - - - - - - - - Qt::Vertical - - - - 0 - 195 - - - - - Qt::Vertical @@ -203,10 +132,8 @@ - - diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index 63d7fdd55..46d5c4f8b 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -49,6 +49,7 @@ TabDiveInformation::TabDiveInformation(QWidget *parent) : TabBase(parent), ui(ne updateWaterTypeWidget(); QPixmap warning (":salinity-warning-icon"); ui->salinityOverWrittenIcon->setPixmap(warning); + ui->salinityOverWrittenIcon->setToolTip("Water type differs from that of dc"); ui->salinityOverWrittenIcon->setToolTipDuration(2500); ui->salinityOverWrittenIcon->setVisible(false); } diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 6e794f07d..7c4d40011 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -34,7 +34,6 @@ #include "TabDiveStatistics.h" #include "TabDiveSite.h" #include "TabDiveComputer.h" -#include "core/settings/qPrefDisplay.h" #include #include @@ -102,7 +101,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), // Alas, this is not the case. When the user switches to system-format, the preferences sends the according // signal. However, the correct date and time format is set by the preferences dialog later. This should be fixed. connect(PreferencesDialog::instance(), &PreferencesDialog::settingsChanged, this, &MainTab::updateDateTimeFields); - connect(qPrefDisplay::instance(), &qPrefDisplay::headerstyle_colorChanged, this, &MainTab::colorsChanged); + QAction *action = new QAction(tr("Apply changes"), this); connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges())); ui.diveNotesMessage->addAction(action); -- cgit v1.2.3-70-g09d2