From e0c70bf082729da09a887ad8e8bbc6b6a4ac37a8 Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Tue, 2 Jul 2019 08:25:47 -0700 Subject: [PATCH] Update date display on Overview page when font is changed in Preferences dialog --- oscar/mainwindow.cpp | 1 + oscar/overview.cpp | 7 +++++++ oscar/overview.h | 3 +++ 3 files changed, 11 insertions(+) diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp index d206eb12..33f98a4b 100644 --- a/oscar/mainwindow.cpp +++ b/oscar/mainwindow.cpp @@ -1313,6 +1313,7 @@ void MainWindow::on_action_Preferences_triggered() } if (overview) { + overview->ResetFont(); overview->RebuildGraphs(true); } diff --git a/oscar/overview.cpp b/oscar/overview.cpp index 2c116b0e..4b58d177 100644 --- a/oscar/overview.cpp +++ b/oscar/overview.cpp @@ -144,6 +144,13 @@ Overview::~Overview() delete ui; } +void Overview::ResetFont() +{ + QFont font = QApplication::font(); + font.setPointSizeF(font.pointSizeF()*1.3F); + dateLabel->setFont(font); +} + void Overview::RebuildGraphs(bool reset) { qint64 minx, maxx; diff --git a/oscar/overview.h b/oscar/overview.h index 125cb5c7..0789480a 100644 --- a/oscar/overview.h +++ b/oscar/overview.h @@ -46,6 +46,9 @@ class Overview : public QWidget //! \brief Recalculates Overview chart info void ReloadGraphs(); + //! \brief Resets font in date display + void ResetFont(); + //! \brief Recalculates Overview chart info, but keeps the date set void ResetGraphs();