From d796517eb3f72604bb4cb0fee3fc014bfaa41fd6 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sun, 1 Sep 2019 13:26:06 +0200 Subject: [PATCH] Fixes #1266 tabs too wide after zoom --- lib/appbase/BaseSettings.cpp | 4 ++-- lib/appbase/widgets/BaseWindow.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/appbase/BaseSettings.cpp b/lib/appbase/BaseSettings.cpp index efcea6f7..78c17926 100644 --- a/lib/appbase/BaseSettings.cpp +++ b/lib/appbase/BaseSettings.cpp @@ -98,12 +98,12 @@ void AB_SETTINGS_CLASS::restoreSnapshot() float AB_SETTINGS_CLASS::getClampedUiScale() const { - return clamp(this->uiScale.getValue(), 0.1, 10); + return clamp(this->uiScale.getValue(), 0.2f, 10); } void AB_SETTINGS_CLASS::setClampedUiScale(float value) { - this->uiScale.setValue(clamp(value, 0.1, 10)); + this->uiScale.setValue(clamp(value, 0.2f, 10)); } #ifndef AB_CUSTOM_SETTINGS diff --git a/lib/appbase/widgets/BaseWindow.cpp b/lib/appbase/widgets/BaseWindow.cpp index d6ed1e8e..cfa6674d 100644 --- a/lib/appbase/widgets/BaseWindow.cpp +++ b/lib/appbase/widgets/BaseWindow.cpp @@ -61,7 +61,12 @@ BaseWindow::BaseWindow(QWidget *parent, Flags _flags) this->init(); getSettings()->uiScale.connect( - [this]() { postToThread([this] { this->updateScale(); }); }, + [this]() { + postToThread([this] { + this->updateScale(); + this->updateScale(); + }); + }, this->connections_); this->updateScale();