Skip to content

Commit a538126

Browse files
committed
Merge pull request #6110
ca5f688 [QT] don't colorize icons on win and mac (Jonas Schnelli) 7247d10 [QT] use alert icon with tooltip insted of "(out of sync)" text (Jonas Schnelli) 51c7c70 [QT] remove frame to avoid double-frame situation in sendcoinsentry.ui (Jonas Schnelli) 2a6b844 [QT] change transaction amount and height in overview page (Jonas Schnelli)
2 parents 351f73e + ca5f688 commit a538126

File tree

8 files changed

+81
-37
lines changed

8 files changed

+81
-37
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/forms/sendcoinsentry.ui

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@
2121
<string>This is a normal payment.</string>
2222
</property>
2323
<property name="frameShape">
24-
<enum>QFrame::StyledPanel</enum>
25-
</property>
26-
<property name="frameShadow">
27-
<enum>QFrame::Sunken</enum>
24+
<enum>QFrame::NoFrame</enum>
2825
</property>
2926
<layout class="QGridLayout" name="gridLayout">
30-
<property name="spacing">
27+
<property name="topMargin">
28+
<number>8</number>
29+
</property>
30+
<property name="bottomMargin">
31+
<number>4</number>
32+
</property>
33+
<property name="horizontalSpacing">
3134
<number>12</number>
3235
</property>
36+
<property name="verticalSpacing">
37+
<number>8</number>
38+
</property>
3339
<item row="0" column="0">
3440
<widget class="QLabel" name="payToLabel">
3541
<property name="text">
@@ -193,6 +199,13 @@
193199
</property>
194200
</widget>
195201
</item>
202+
<item row="4" column="0" colspan="2">
203+
<widget class="Line" name="line">
204+
<property name="orientation">
205+
<enum>Qt::Horizontal</enum>
206+
</property>
207+
</widget>
208+
</item>
196209
</layout>
197210
</widget>
198211
<widget class="QFrame" name="SendCoins_UnauthenticatedPaymentRequest">
@@ -618,10 +631,7 @@
618631
<bool>true</bool>
619632
</property>
620633
<property name="frameShape">
621-
<enum>QFrame::StyledPanel</enum>
622-
</property>
623-
<property name="frameShadow">
624-
<enum>QFrame::Sunken</enum>
634+
<enum>QFrame::NoFrame</enum>
625635
</property>
626636
<layout class="QGridLayout" name="gridLayout_is">
627637
<property name="spacing">
@@ -1150,10 +1160,7 @@
11501160
<bool>true</bool>
11511161
</property>
11521162
<property name="frameShape">
1153-
<enum>QFrame::StyledPanel</enum>
1154-
</property>
1155-
<property name="frameShadow">
1156-
<enum>QFrame::Sunken</enum>
1163+
<enum>QFrame::NoFrame</enum>
11571164
</property>
11581165
<layout class="QGridLayout" name="gridLayout_s">
11591166
<property name="spacing">

src/qt/overviewpage.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include <QAbstractItemDelegate>
1919
#include <QPainter>
2020

21-
#define DECORATION_SIZE 64
22-
#define NUM_ITEMS 3
21+
#define DECORATION_SIZE 54
22+
#define NUM_ITEMS 5
2323

2424
class TxViewDelegate : public QAbstractItemDelegate
2525
{
@@ -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

src/qt/scicon.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ static void MakeSingleColorImage(QImage& img, const QColor& colorbase)
2727
QImage SingleColorImage(const QString& filename, const QColor& colorbase)
2828
{
2929
QImage img(filename);
30+
#if !defined(WIN32) && !defined(MAC_OSX)
3031
MakeSingleColorImage(img, colorbase);
32+
#endif
3133
return img;
3234
}
3335

3436
QIcon SingleColorIcon(const QIcon& ico, const QColor& colorbase)
3537
{
38+
#if defined(WIN32) || defined(MAC_OSX)
39+
return ico;
40+
#else
3641
QIcon new_ico;
3742
QSize sz;
3843
Q_FOREACH(sz, ico.availableSizes())
@@ -42,6 +47,7 @@ QIcon SingleColorIcon(const QIcon& ico, const QColor& colorbase)
4247
new_ico.addPixmap(QPixmap::fromImage(img));
4348
}
4449
return new_ico;
50+
#endif
4551
}
4652

4753
QIcon SingleColorIcon(const QString& filename, const QColor& colorbase)
@@ -51,6 +57,9 @@ QIcon SingleColorIcon(const QString& filename, const QColor& colorbase)
5157

5258
QColor SingleColor()
5359
{
60+
#if defined(WIN32) || defined(MAC_OSX)
61+
return QColor(0,0,0);
62+
#else
5463
const QColor colorHighlightBg(QApplication::palette().color(QPalette::Highlight));
5564
const QColor colorHighlightFg(QApplication::palette().color(QPalette::HighlightedText));
5665
const QColor colorText(QApplication::palette().color(QPalette::WindowText));
@@ -61,6 +70,7 @@ QColor SingleColor()
6170
else
6271
colorbase = colorHighlightFg;
6372
return colorbase;
73+
#endif
6474
}
6575

6676
QIcon SingleColorIcon(const QString& filename)

0 commit comments

Comments
 (0)