Skip to content

Commit

Permalink
Update StakingPage
Browse files Browse the repository at this point in the history
-WalletLock unlock-stakeonly  pop-up
  • Loading branch information
Oliver Ziegler authored and Oliver Ziegler committed Jul 28, 2019
1 parent b4944ab commit c0f4d93
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/qt/stakingdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,28 @@ void StakingDialog::updateStakeReportNow()

void StakingDialog::btn_Stake_OnClicked()
{
SetStaking(true);
ui->btn_Stake_Off->setStyleSheet(" font-size:20px; height:35px; color: #6d7886; ");
ui->btn_Stake_On->setStyleSheet(" font-size:20px; height:35px; color: white; background-color:#1b2234; ");
ui->labelStakingStatus->setText(QString("Staking"));
ui->stakeingDot->setIcon(QIcon(":/icons/greendot"));
if (!walletModel)
return;
// Unlock wallet when requested by wallet model
if (walletModel->getEncryptionStatus() == WalletModel::Locked)
{
AskPassphraseDialog dlg(AskPassphraseDialog::UnlockStaking, this);
dlg.setModel(walletModel);
dlg.exec();
}
if(fWalletUnlockStakingOnly || walletModel->getEncryptionStatus() == WalletModel::Unlocked)
{

ui->btn_Stake_Off->setStyleSheet(" font-size:20px; height:35px; color: #6d7886; ");
ui->btn_Stake_On->setStyleSheet(" font-size:20px; height:35px; color: white; background-color:#1b2234; ");
ui->labelStakingStatus->setText(QString("Staking"));
ui->stakeingDot->setIcon(QIcon(":/icons/greendot"));

}
}

void StakingDialog::btn_Stake_OffClicked()
{
SetStaking(false);
ui->btn_Stake_On->setStyleSheet(" font-size:20px; height:35px; color: #6d7886; ");
ui->btn_Stake_Off->setStyleSheet(" font-size:20px; height:35px; color: white; background-color:#1b2234; ");
ui->labelStakingStatus->setText(QString("Staking"));
Expand Down

0 comments on commit c0f4d93

Please sign in to comment.