Skip to content

Commit 9245ff5

Browse files
committed
Merge pull request #1212 from Diapolo/overviewpage
move many overviewpage settings from code to ui XML-file...
2 parents 1eb2d8e + 4295311 commit 9245ff5

File tree

2 files changed

+42
-16
lines changed

2 files changed

+42
-16
lines changed

src/qt/forms/overviewpage.ui

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,23 @@
4343
</item>
4444
<item row="2" column="1">
4545
<widget class="QLabel" name="labelBalance">
46+
<property name="font">
47+
<font>
48+
<weight>75</weight>
49+
<bold>true</bold>
50+
</font>
51+
</property>
52+
<property name="cursor">
53+
<cursorShape>IBeamCursor</cursorShape>
54+
</property>
55+
<property name="toolTip">
56+
<string>Your current balance</string>
57+
</property>
4658
<property name="text">
47-
<string>123.456 BTC</string>
59+
<string notr="true">123.456 BTC</string>
60+
</property>
61+
<property name="textInteractionFlags">
62+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
4863
</property>
4964
</widget>
5065
</item>
@@ -57,6 +72,9 @@
5772
</item>
5873
<item row="4" column="1">
5974
<widget class="QLabel" name="labelNumTransactions">
75+
<property name="toolTip">
76+
<string>Total number of transactions in wallet</string>
77+
</property>
6078
<property name="text">
6179
<string>0</string>
6280
</property>
@@ -71,8 +89,23 @@
7189
</item>
7290
<item row="3" column="1">
7391
<widget class="QLabel" name="labelUnconfirmed">
92+
<property name="font">
93+
<font>
94+
<weight>75</weight>
95+
<bold>true</bold>
96+
</font>
97+
</property>
98+
<property name="cursor">
99+
<cursorShape>IBeamCursor</cursorShape>
100+
</property>
101+
<property name="toolTip">
102+
<string>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</string>
103+
</property>
74104
<property name="text">
75-
<string>0 BTC</string>
105+
<string notr="true">0 BTC</string>
106+
</property>
107+
<property name="textInteractionFlags">
108+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
76109
</property>
77110
</widget>
78111
</item>
@@ -81,6 +114,7 @@
81114
<property name="font">
82115
<font>
83116
<pointsize>11</pointsize>
117+
<weight>75</weight>
84118
<bold>true</bold>
85119
</font>
86120
</property>
@@ -127,6 +161,9 @@
127161
</item>
128162
<item>
129163
<widget class="QListView" name="listTransactions">
164+
<property name="styleSheet">
165+
<string notr="true">QListView { background:transparent }</string>
166+
</property>
130167
<property name="frameShape">
131168
<enum>QFrame::NoFrame</enum>
132169
</property>
@@ -136,6 +173,9 @@
136173
<property name="horizontalScrollBarPolicy">
137174
<enum>Qt::ScrollBarAlwaysOff</enum>
138175
</property>
176+
<property name="selectionMode">
177+
<enum>QAbstractItemView::NoSelection</enum>
178+
</property>
139179
</widget>
140180
</item>
141181
</layout>

src/qt/overviewpage.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,9 @@ OverviewPage::OverviewPage(QWidget *parent) :
9898
{
9999
ui->setupUi(this);
100100

101-
// Balance: <balance>
102-
ui->labelBalance->setFont(QFont("Monospace", -1, QFont::Bold));
103-
ui->labelBalance->setToolTip(tr("Your current balance"));
104-
ui->labelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
105-
106-
// Unconfirmed balance: <balance>
107-
ui->labelUnconfirmed->setFont(QFont("Monospace", -1, QFont::Bold));
108-
ui->labelUnconfirmed->setToolTip(tr("Total of transactions that have yet to be confirmed, and do not yet count toward the current balance"));
109-
ui->labelUnconfirmed->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
110-
111-
ui->labelNumTransactions->setToolTip(tr("Total number of transactions in wallet"));
112-
113101
// Recent transactions
114-
ui->listTransactions->setStyleSheet("QListView { background:transparent }");
115102
ui->listTransactions->setItemDelegate(txdelegate);
116103
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
117-
ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection);
118104
ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
119105
ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);
120106

0 commit comments

Comments
 (0)