Skip to content

Commit

Permalink
GUI: Differentiate between not passing and over budget in mini-card
Browse files Browse the repository at this point in the history
Set a unique label text for proposals that are passing but there aren't
enough funds left in the budget to find them.
  • Loading branch information
Fuzzbawls committed Jan 10, 2022
1 parent f82a98d commit 55f20c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/qt/pivx/proposalcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void ProposalCard::setProposal(const ProposalInfo& _proposalInfo)
ui->labelYes->setText(tr("Yes") + " " + QString::number(percentageYes) + "%");

QString cssClassStatus;
if (proposalInfo.status == ProposalInfo::WAITING_FOR_APPROVAL){
if (proposalInfo.status == ProposalInfo::WAITING_FOR_APPROVAL) {
cssClassStatus = "card-status-no-votes";
setStatusAndVotes(tr("Waiting"), 50);
} else if (proposalInfo.status == ProposalInfo::FINISHED) {
Expand All @@ -62,7 +62,9 @@ void ProposalCard::setProposal(const ProposalInfo& _proposalInfo)
} else if (proposalInfo.status == ProposalInfo::NOT_PASSING ||
proposalInfo.status == ProposalInfo::PASSING_NOT_FUNDED) {
cssClassStatus = "card-status-not-passing";
setStatusAndVotes(tr("Not Passing"), (int)percentageNo);
setStatusAndVotes(
proposalInfo.status == ProposalInfo::NOT_PASSING ? tr("Not Passing") : tr("Over Budget"),
(int)percentageNo);
} else if (proposalInfo.status == ProposalInfo::PASSING) {
cssClassStatus = "card-status-passing";
setStatusAndVotes(tr("Passing"), (int)percentageNo);
Expand Down

0 comments on commit 55f20c3

Please sign in to comment.