fix: update input fonts on fontChanged signal (#6462)

This commit is contained in:
Feng
2025-09-20 07:47:50 -04:00
committed by GitHub
parent 448b321259
commit a40debb8ee
2 changed files with 3 additions and 3 deletions
+1
View File
@@ -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 <kbd>Option</kbd> + <kbd>Arrows</kbd> are used for cursor navigation. (#6470)
- Bugfix: Fixed <kbd>CMD</kbd>+<kbd>Backspace</kbd> not working in the input on macOS if there was a selection. (#6469)
+2 -3
View File
@@ -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));
}