Calc: update exchange icon on skin change

This commit is contained in:
tobtoht
2021-02-03 20:40:35 +01:00
parent e0f7473ed4
commit 904432ea82
7 changed files with 54 additions and 4 deletions
+18
View File
@@ -5,6 +5,24 @@
#include <QtWidgets>
DoublePixmapLabel::DoublePixmapLabel(QWidget *parent)
: QLabel(parent)
{}
void DoublePixmapLabel::setAssets(const QString &firstAsset, const QString &secondAsset)
{
m_first.load(firstAsset);
m_second.load(secondAsset);
this->setPixmap(m_first);
}
void DoublePixmapLabel::setMode(bool mode) {
if (mode != m_mode) {
this->setPixmap(mode ? m_second : m_first);
}
m_mode = mode;
}
StatusBarButton::StatusBarButton(const QIcon &icon, const QString &tooltip, QWidget *parent) : QPushButton(parent) {
setIcon(icon);
setToolTip(tooltip);