Skip to content

Commit

Permalink
[UI] Use only one column for Proposal list
Browse files Browse the repository at this point in the history
  • Loading branch information
Warrows committed Dec 26, 2018
1 parent d6c68c6 commit bbf3274
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.cpp
Expand Up @@ -369,7 +369,7 @@ void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
connect(masternodeAction, SIGNAL(triggered()), this, SLOT(gotoMasternodePage()));
}

governanceAction = new QAction(QIcon(":/icons/masternodes"), tr("&Governance"), this);
governanceAction = new QAction(QIcon(":/icons/governance"), tr("&Governance"), this);
governanceAction->setStatusTip(tr("Show Proposals"));
governanceAction->setToolTip(governanceAction->statusTip());
governanceAction->setCheckable(true);
Expand Down
4 changes: 2 additions & 2 deletions src/qt/forms/governancepage.ui
Expand Up @@ -195,7 +195,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="proposalGrid" rowstretch="0" columnstretch="0">
<layout class="QVBoxLayout" name="proposalGrid" rowstretch="0" columnstretch="0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
Expand All @@ -206,7 +206,7 @@
<number>0</number>
</property>
<property name="rightMargin">
<number>50</number>
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
Expand Down
12 changes: 4 additions & 8 deletions src/qt/governancepage.cpp
Expand Up @@ -110,7 +110,7 @@ void GovernancePage::updateProposalList(bool fForce)
{
int nCountMyMasternodes = masternodeConfig.getCount();
std::vector<CBudgetProposal*> winningProps = budget.GetAllProposals();
int nGridRow = 0, nGridCol = 0;
int nRow = 0;
for (CBudgetProposal* pbudgetProposal : winningProps) {
if (!pbudgetProposal->fValid) continue;
if (pbudgetProposal->GetRemainingPaymentCount() < 1) continue;
Expand Down Expand Up @@ -185,13 +185,9 @@ void GovernancePage::updateProposalList(bool fForce)
proposalItem->addLayout(proposalVotes);

proposalFrame->setMaximumHeight(150);
ui->proposalGrid->addWidget(proposalFrame, nGridRow, nGridCol);

if (nGridCol == 1 ) {
++nGridRow;
nGridCol = -1;
}
++nGridCol;
ui->proposalGrid->addWidget(proposalFrame, nRow);

++nRow;
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/qt/pivx.qrc
Expand Up @@ -33,6 +33,8 @@
<file alias="history">res/icons/history.png</file>
<file alias="overview">res/icons/overview.png</file>
<file alias="masternodes">res/icons/masternodes.png</file>
<file alias="governance">res/icons/governance.png</file>
<file alias="governance_dark">res/icons/governance_dark.png</file>
<file alias="export">res/icons/export.png</file>
<file alias="synced">res/icons/synced.png</file>
<file alias="remove">res/icons/remove.png</file>
Expand Down
Binary file added src/qt/res/icons/governance.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/qt/res/icons/governance_dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bbf3274

Please sign in to comment.