From a40debb8eef0c3f2354e1c20bb4a1a2a575e66e6 Mon Sep 17 00:00:00 2001 From: Feng <59535397+Obertura777@users.noreply.github.com> Date: Sat, 20 Sep 2025 07:47:50 -0400 Subject: [PATCH] fix: update input fonts on fontChanged signal (#6462) --- CHANGELOG.md | 1 + src/widgets/splits/SplitInput.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c9d2101..59bd0b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Bugfix: Fixed flickering tooltips on Wayland when the mouse cursor is over them. (#6451) - Bugfix: Fixed `c2.Channel` comparing `false` to the same channel. (#6456) - Bugfix: Fixed an issue where the moderation icon was missing from the Moderation tab. (#6457) +- Bugfix: Update the message length font when updating your chat font. (#6462) - Bugfix: Fixed "_A message from X has been deleted_" messages logging empty messages to disk. (#6465) - Bugfix: Do not set default hotkeys for focusing splits on macOS, as Option + Arrows are used for cursor navigation. (#6470) - Bugfix: Fixed CMD+Backspace not working in the input on macOS if there was a selection. (#6469) diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index b2f2be3c..735f2a16 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -217,6 +217,8 @@ void SplitInput::initLayout() app->getFonts()->fontChanged, [=, this]() { this->ui_.textEdit->setFont( app->getFonts()->getFont(FontStyle::ChatMedium, this->scale())); + this->ui_.textEditLength->setFont(app->getFonts()->getFont( + FontStyle::TimestampMedium, this->scale())); this->ui_.replyLabel->setFont(app->getFonts()->getFont( FontStyle::ChatMediumBold, this->scale())); }); @@ -275,16 +277,13 @@ void SplitInput::scaleChangedEvent(float scale) this->ui_.vbox->setSpacing(this->marginForTheme()); } } - // TODO: This font does _not_ get updated when you change your chat font this->ui_.textEdit->setFont( app->getFonts()->getFont(FontStyle::ChatMedium, scale)); - // TODO: This font does _not_ get updated when you change your chat font // NOTE: We're using TimestampMedium here to get a font that uses the tnum font feature, // meaning numbers get equal width & don't bounce around while the user is typing. this->ui_.textEditLength->setFont( app->getFonts()->getFont(FontStyle::TimestampMedium, scale)); - // TODO: This font does _not_ get updated when you change your chat font this->ui_.replyLabel->setFont( app->getFonts()->getFont(FontStyle::ChatMediumBold, scale)); }