chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
+4 -4
View File
@@ -47,13 +47,13 @@ TooltipWidget::TooltipWidget(BaseWidget *parent)
this->setLayout(this->vLayout_);
this->currentStyle_ = TooltipStyle::Vertical;
this->connections_.managedConnect(getIApp()->getFonts()->fontChanged,
this->connections_.managedConnect(getApp()->getFonts()->fontChanged,
[this] {
this->updateFont();
});
this->updateFont();
auto *windows = getIApp()->getWindows();
auto *windows = getApp()->getWindows();
this->connections_.managedConnect(windows->gifRepaintRequested, [this] {
if (!this->isVisible())
{
@@ -300,8 +300,8 @@ void TooltipWidget::scaleChangedEvent(float)
void TooltipWidget::updateFont()
{
this->setFont(getIApp()->getFonts()->getFont(FontStyle::ChatMediumSmall,
this->scale()));
this->setFont(getApp()->getFonts()->getFont(FontStyle::ChatMediumSmall,
this->scale()));
}
void TooltipWidget::setWordWrap(bool wrap)