refactor: Fonts (#5228)

This commit is contained in:
pajlada
2024-03-10 14:27:08 +01:00
committed by GitHub
parent e56f7136a9
commit e7508332ff
16 changed files with 128 additions and 143 deletions
+6 -5
View File
@@ -47,9 +47,10 @@ TooltipWidget::TooltipWidget(BaseWidget *parent)
this->setLayout(this->vLayout_);
this->currentStyle_ = TooltipStyle::Vertical;
this->connections_.managedConnect(getFonts()->fontChanged, [this] {
this->updateFont();
});
this->connections_.managedConnect(getIApp()->getFonts()->fontChanged,
[this] {
this->updateFont();
});
this->updateFont();
auto *windows = getIApp()->getWindows();
@@ -299,8 +300,8 @@ void TooltipWidget::scaleChangedEvent(float)
void TooltipWidget::updateFont()
{
this->setFont(
getFonts()->getFont(FontStyle::ChatMediumSmall, this->scale()));
this->setFont(getIApp()->getFonts()->getFont(FontStyle::ChatMediumSmall,
this->scale()));
}
void TooltipWidget::setWordWrap(bool wrap)