diff --git a/CHANGELOG.md b/CHANGELOG.md index 22df017f..09aa72a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Minor: Added hotkey Action for opening account selector. (#6192) - Minor: Add a setting to change the emote and badge thumbnail size. (#6126) - Minor: Add an import and export button to image uploader settings. (#6284) +- Minor: Message character length label is now monospaced. (#6366) - Minor: Add a setting under Moderation -> Logs to customize the timestamp used for chat logs. (#6338) - Minor: Add a setting under Moderation -> Logs to use server timestamp from the message instead of the local clock time for logging. (#6346) - Bugfix: Commands are no longer tab-completable in the middle of messages. (#6273) diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 036cb1e1..5df7904e 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -166,18 +166,18 @@ void SplitInput::initLayout() auto box = hboxLayout.emplace().withoutMargin(); box->setSpacing(0); { - auto textEditLength = - box.emplace().assign(&this->ui_.textEditLength); - textEditLength->setAlignment(Qt::AlignRight); + this->ui_.textEditLength = new QLabel(); + // Right-align the labels contents + this->ui_.textEditLength->setAlignment(Qt::AlignRight); + box->addWidget(this->ui_.textEditLength); - box->addStretch(1); - box.emplace( - SvgButton::Src{ - .dark = ":/buttons/emote.svg", - .light = ":/buttons/emoteDark.svg", - }, - nullptr, QSize{6, 3}) - .assign(&this->ui_.emoteButton); + this->ui_.emoteButton = new SvgButton( + { + .dark = ":/buttons/emote.svg", + .light = ":/buttons/emoteDark.svg", + }, + nullptr, QSize{6, 3}); + box->addWidget(this->ui_.emoteButton, 0, Qt::AlignRight); } // ---- misc @@ -242,6 +242,7 @@ 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)); @@ -252,8 +253,12 @@ void SplitInput::scaleChangedEvent(float scale) this->ui_.textEdit->setStyleSheet(this->theme->splits.input.styleSheet); this->ui_.textEdit->setPalette(placeholderPalette); + // 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::ChatMedium, scale)); + 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)); }