From b0fee1162110fa0c29248b8e693691afd198cf66 Mon Sep 17 00:00:00 2001 From: nerix Date: Sun, 19 Jan 2025 11:10:41 +0100 Subject: [PATCH] fix: only use window scale in children (#5833) --- CHANGELOG.md | 2 +- src/widgets/BaseWidget.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7fc8695..5ab8dea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Bugfix: Fixed a crash relating to Lua HTTP. (#5800) - Bugfix: Fixed a crash that could occur on Linux and macOS when clicking "Install" from the update prompt. (#5818) - Bugfix: Fixed missing word wrap in update popup. (#5811) -- Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794) +- Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794, #5833) - Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784) - Dev: Updated Conan dependencies. (#5776) diff --git a/src/widgets/BaseWidget.cpp b/src/widgets/BaseWidget.cpp index e12fc8c3..74399803 100644 --- a/src/widgets/BaseWidget.cpp +++ b/src/widgets/BaseWidget.cpp @@ -19,8 +19,13 @@ namespace chatterino { BaseWidget::BaseWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) , theme(getApp()->getThemes()) - , scale_(this->scale()) { + auto *baseWidget = dynamic_cast(this->window()); + if (baseWidget && baseWidget != this) + { + this->scale_ = baseWidget->scale_; + } + this->signalHolder_.managedConnect(this->theme->updated, [this]() { this->themeChangedEvent();