fix: emote button is now rendered smoothlier (#6080)

This commit is contained in:
pajlada
2025-03-15 13:46:11 +01:00
committed by GitHub
parent 6cdd28c7d4
commit 95eee28002
5 changed files with 38 additions and 12 deletions
+10 -10
View File
@@ -165,11 +165,9 @@ void SplitInput::initLayout()
textEditLength->setAlignment(Qt::AlignRight);
box->addStretch(1);
box.emplace<EffectLabel>().assign(&this->ui_.emoteButton);
box.emplace<Button>().assign(&this->ui_.emoteButton);
}
this->ui_.emoteButton->getLabel().setTextFormat(Qt::RichText);
// ---- misc
// set edit font
@@ -266,8 +264,6 @@ void SplitInput::themeChangedEvent()
this->ui_.textEdit->setStyleSheet(this->theme->splits.input.styleSheet);
this->ui_.textEdit->setPalette(placeholderPalette);
this->ui_.emoteButton->getLabel().setStyleSheet("color: #000");
if (this->theme->isLightTheme())
{
this->ui_.replyLabel->setStyleSheet("color: #333");
@@ -289,13 +285,17 @@ void SplitInput::updateEmoteButton()
{
auto scale = this->scale();
auto text =
QStringLiteral("<img src=':/buttons/%1.svg' width='%2' height='%2' />")
.arg(this->theme->isLightTheme() ? "emoteDark" : "emote")
.arg(int(12 * scale));
if (this->theme->isLightTheme())
{
this->ui_.emoteButton->setSvgResource(":/buttons/emoteDark.svg");
}
else
{
this->ui_.emoteButton->setSvgResource(":/buttons/emote.svg");
}
this->ui_.emoteButton->getLabel().setText(text);
this->ui_.emoteButton->setFixedHeight(int(18 * scale));
this->ui_.emoteButton->setFixedWidth(int(18 * scale));
}
void SplitInput::updateCancelReplyButton()