mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-19 08:08:38 +02:00
Calc: update exchange icon on skin change
This commit is contained in:
+7
-2
@@ -6,6 +6,8 @@
|
||||
#include "calcwidget.h"
|
||||
#include "ui_calcwidget.h"
|
||||
#include "mainwindow.h"
|
||||
#include "components.h"
|
||||
#include "utils/ColorScheme.h"
|
||||
|
||||
CalcWidget::CalcWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -15,8 +17,7 @@ CalcWidget::CalcWidget(QWidget *parent) :
|
||||
m_ctx = MainWindow::getContext();
|
||||
|
||||
ui->imageExchange->setBackgroundRole(QPalette::Base);
|
||||
QPixmap pm(":/assets/images/exchange.png");
|
||||
ui->imageExchange->setPixmap(pm);
|
||||
ui->imageExchange->setAssets(":/assets/images/exchange.png", ":/assets/images/exchange_white.png");
|
||||
ui->imageExchange->setScaledContents(true);
|
||||
ui->imageExchange->setFixedSize(26, 26);
|
||||
|
||||
@@ -134,6 +135,10 @@ void CalcWidget::initComboBox() {
|
||||
this->m_comboBoxInit = true;
|
||||
}
|
||||
|
||||
void CalcWidget::skinChanged() {
|
||||
ui->imageExchange->setMode(ColorScheme::hasDarkBackground(this));
|
||||
}
|
||||
|
||||
CalcWidget::~CalcWidget() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user