Skip to content

Commit dc24786

Browse files
committed
[GUI] dashboard change theme, staking graph fix.
1 parent 259e367 commit dc24786

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/qt/pivx/dashboardwidget.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ DashboardWidget::DashboardWidget(PIVXGUI* parent) :
4545

4646
// Title
4747
ui->labelTitle->setProperty("cssClass", "text-title-screen");
48-
4948
ui->labelTitle2->setText(tr("Staking Rewards"));
5049
ui->labelTitle2->setProperty("cssClass", "text-title-screen");
5150

@@ -72,9 +71,7 @@ DashboardWidget::DashboardWidget(PIVXGUI* parent) :
7271
ui->labelAmountPiv->setProperty("cssClass", "text-stake-piv-disable");
7372
ui->labelAmountZpiv->setProperty("cssClass", "text-stake-zpiv-disable");
7473

75-
ui->pushButtonAll->setProperty("cssClass", "btn-check-time");
76-
ui->pushButtonMonth->setProperty("cssClass", "btn-check-time");
77-
ui->pushButtonYear->setProperty("cssClass", "btn-check-time");
74+
setCssProperty({ui->pushButtonAll, ui->pushButtonMonth, ui->pushButtonYear}, "btn-check-time");
7875
ui->comboBoxMonths->setProperty("cssClass", "btn-combo-chart-selected");
7976
ui->comboBoxYears->setProperty("cssClass", "btn-combo-chart-selected");
8077

@@ -271,8 +268,7 @@ void DashboardWidget::walletSynced(bool sync){
271268

272269
void DashboardWidget::changeTheme(bool isLightTheme, QString& theme){
273270
static_cast<TxViewHolder*>(this->txViewDelegate->getRowFactory())->isLightTheme = isLightTheme;
274-
if (hasStakes())
275-
this->changeChartColors();
271+
if (chart) this->changeChartColors();
276272
}
277273

278274
const QStringList monthsNames = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

0 commit comments

Comments
 (0)