subsurface/desktop-widgets/preferences/preferences_defaults.cpp
Dirk Hohndel be3190db8a 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 <dirk@hohndel.org>
2020-11-04 14:51:55 -08:00

38 lines
1.1 KiB
C++

// SPDX-License-Identifier: GPL-2.0
#include "preferences_defaults.h"
#include "ui_preferences_defaults.h"
#include "core/dive.h"
#include "preferencesdialog.h"
#include "core/settings/qPrefGeneral.h"
#include "core/settings/qPrefDisplay.h"
#include "core/settings/qPrefCloudStorage.h"
#include "core/settings/qPrefDiveComputer.h"
#include <QFileDialog>
#include <QProcess>
#include <QMessageBox>
PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("Display"), QIcon(":preferences-display-icon"), 0 ), ui(new Ui::PreferencesDefaults())
{
ui->setupUi(this);
}
PreferencesDefaults::~PreferencesDefaults()
{
delete ui;
}
void PreferencesDefaults::refreshSettings()
{
ui->font->setCurrentFont(qPrefDisplay::divelist_font());
ui->fontsize->setValue(qPrefDisplay::font_size());
ui->velocitySlider->setValue(qPrefDisplay::animation_speed());
}
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());
}