Skip to content

Commit 7247d10

Browse files
committed
[QT] use alert icon with tooltip insted of "(out of sync)" text
# Conflicts: # src/qt/forms/overviewpage.ui # src/qt/overviewpage.cpp
1 parent 51c7c70 commit 7247d10

File tree

6 files changed

+49
-22
lines changed

6 files changed

+49
-22
lines changed

doc/assets-attribution.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The following is a list of assets used in the bitcoin source and their proper at
2222
src/qt/res/icons/receive.png, src/qt/res/icons/remove.png,
2323
src/qt/res/icons/send.png, src/qt/res/icons/synced.png,
2424
src/qt/res/icons/transaction*.png, src/qt/res/icons/tx_output.png,
25+
src/qt/res/icons/warning.png
2526

2627
Jonas Schnelli
2728
-----------------------

src/Makefile.qt.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ RES_ICONS = \
256256
qt/res/icons/tx_input.png \
257257
qt/res/icons/tx_output.png \
258258
qt/res/icons/tx_mined.png \
259+
qt/res/icons/warning.png \
259260
qt/res/icons/verify.png
260261

261262
BITCOIN_QT_CPP = \

src/qt/bitcoin.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<file alias="about">res/icons/about.png</file>
4646
<file alias="about_qt">res/icons/about_qt.png</file>
4747
<file alias="verify">res/icons/verify.png</file>
48+
<file alias="warning">res/icons/warning.png</file>
4849
</qresource>
4950
<qresource prefix="/movies">
5051
<file alias="spinner-000">res/movies/spinner-000.png</file>

src/qt/forms/overviewpage.ui

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,35 @@
5959
</widget>
6060
</item>
6161
<item>
62-
<widget class="QLabel" name="labelWalletStatus">
63-
<property name="cursor">
64-
<cursorShape>WhatsThisCursor</cursorShape>
62+
<widget class="QPushButton" name="labelWalletStatus">
63+
<property name="enabled">
64+
<bool>false</bool>
65+
</property>
66+
<property name="maximumSize">
67+
<size>
68+
<width>30</width>
69+
<height>16777215</height>
70+
</size>
6571
</property>
6672
<property name="toolTip">
6773
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string>
6874
</property>
69-
<property name="styleSheet">
70-
<string notr="true">QLabel { color: red; }</string>
71-
</property>
7275
<property name="text">
73-
<string notr="true">(out of sync)</string>
76+
<string/>
7477
</property>
75-
<property name="alignment">
76-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
78+
<property name="icon">
79+
<iconset resource="../bitcoin.qrc">
80+
<normaloff>:/icons/warning</normaloff>
81+
<disabledoff>:/icons/warning</disabledoff>:/icons/warning</iconset>
82+
</property>
83+
<property name="iconSize">
84+
<size>
85+
<width>24</width>
86+
<height>24</height>
87+
</size>
88+
</property>
89+
<property name="flat">
90+
<bool>true</bool>
7791
</property>
7892
</widget>
7993
</item>
@@ -431,21 +445,35 @@
431445
</widget>
432446
</item>
433447
<item>
434-
<widget class="QLabel" name="labelTransactionsStatus">
435-
<property name="cursor">
436-
<cursorShape>WhatsThisCursor</cursorShape>
448+
<widget class="QPushButton" name="labelTransactionsStatus">
449+
<property name="enabled">
450+
<bool>false</bool>
451+
</property>
452+
<property name="maximumSize">
453+
<size>
454+
<width>30</width>
455+
<height>16777215</height>
456+
</size>
437457
</property>
438458
<property name="toolTip">
439459
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string>
440460
</property>
441-
<property name="styleSheet">
442-
<string notr="true">QLabel { color: red; }</string>
443-
</property>
444461
<property name="text">
445-
<string notr="true">(out of sync)</string>
462+
<string/>
446463
</property>
447-
<property name="alignment">
448-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
464+
<property name="icon">
465+
<iconset resource="../bitcoin.qrc">
466+
<normaloff>:/icons/warning</normaloff>
467+
<disabledoff>:/icons/warning</disabledoff>:/icons/warning</iconset>
468+
</property>
469+
<property name="iconSize">
470+
<size>
471+
<width>24</width>
472+
<height>24</height>
473+
</size>
474+
</property>
475+
<property name="flat">
476+
<bool>true</bool>
449477
</property>
450478
</widget>
451479
</item>

src/qt/overviewpage.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ OverviewPage::OverviewPage(QWidget *parent) :
129129

130130
connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));
131131

132-
// init "out of sync" warning labels
133-
ui->labelWalletStatus->setText("(" + tr("out of sync") + ")");
134-
ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")");
135-
136132
// start with displaying the "out of sync" warnings
137133
showOutOfSyncWarning(true);
138134
}

src/qt/res/icons/warning.png

3.72 KB
Loading

0 commit comments

Comments
 (0)