Provide scaled pixmaps by UIThemeManager

Avoid leaking the paths of the theme resource files outside of the theme support implementation.

PR #18269.
This commit is contained in:
Vladimir Golovnev
2023-01-17 09:29:00 +03:00
committed by GitHub
parent 43e059801e
commit 53cec6db09
7 changed files with 33 additions and 55 deletions

View File

@@ -56,10 +56,10 @@ SpeedLimitDialog::SpeedLimitDialog(QWidget *parent)
{
m_ui->setupUi(this);
m_ui->labelGlobalSpeedIcon->setPixmap(Utils::Gui::scaledPixmapSvg(UIThemeManager::instance()->getIconPath(u"slow_off"_qs)
, this, Utils::Gui::mediumIconSize(this).height()));
m_ui->labelAltGlobalSpeedIcon->setPixmap(Utils::Gui::scaledPixmapSvg(UIThemeManager::instance()->getIconPath(u"slow"_qs)
, this, Utils::Gui::mediumIconSize(this).height()));
m_ui->labelGlobalSpeedIcon->setPixmap(
UIThemeManager::instance()->getScaledPixmap(u"slow_off"_qs, Utils::Gui::mediumIconSize(this).height()));
m_ui->labelAltGlobalSpeedIcon->setPixmap(
UIThemeManager::instance()->getScaledPixmap(u"slow"_qs, Utils::Gui::mediumIconSize(this).height()));
const auto initSlider = [](QSlider *slider, const int value, const int maximum)
{