fix: proper svg icon rendering on hidpi screen.

This commit is contained in:
Chris Xiong
2022-09-29 01:11:21 -04:00
committed by Gary Wang
parent 756d0be32f
commit cc7d58d4ec
7 changed files with 46 additions and 18 deletions

View File

@ -4,6 +4,7 @@
#include "toolbutton.h"
#include "actionmanager.h"
#include "opacityhelper.h"
#include <QPainter>
@ -26,6 +27,11 @@ ToolButton::ToolButton(bool hoverColor, QWidget *parent)
setStyleSheet(qss);
}
void ToolButton::setIconResourcePath(const QString &iconp)
{
this->setIcon(ActionManager::loadHidpiIcon(iconp, this->iconSize()));
}
void ToolButton::setOpacity(qreal opacity, bool animated)
{
m_opacityHelper->setOpacity(opacity, animated);