File tree Expand file tree Collapse file tree 8 files changed +21
-3
lines changed Expand file tree Collapse file tree 8 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,10 @@ RES_ICONS = \
252
252
qt/res/icons/tx_inout.png \
253
253
qt/res/icons/tx_input.png \
254
254
qt/res/icons/tx_output.png \
255
- qt/res/icons/tx_mined.png
255
+ qt/res/icons/tx_mined.png \
256
+ qt/res/icons/unit_btc.png \
257
+ qt/res/icons/unit_mbtc.png \
258
+ qt/res/icons/unit_ubtc.png
256
259
257
260
BITCOIN_QT_CPP = \
258
261
qt/bitcoinaddressvalidator.cpp \
Original file line number Diff line number Diff line change 35
35
<file alias="tx_input">res/icons/tx_input.png</file>
36
36
<file alias="tx_output">res/icons/tx_output.png</file>
37
37
<file alias="tx_inout">res/icons/tx_inout.png</file>
38
+ <file alias="unit_btc">res/icons/unit_btc.png</file>
39
+ <file alias="unit_mbtc">res/icons/unit_mbtc.png</file>
40
+ <file alias="unit_ubtc">res/icons/unit_ubtc.png</file>
38
41
<file alias="lock_closed">res/icons/lock_closed.png</file>
39
42
<file alias="lock_open">res/icons/lock_open.png</file>
40
43
<file alias="key">res/icons/key.png</file>
Original file line number Diff line number Diff line change @@ -1014,7 +1014,6 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl():QLabel()
1014
1014
{
1015
1015
optionsModel = 0 ;
1016
1016
createContextMenu ();
1017
- setStyleSheet (" font:11pt; color: #333333" );
1018
1017
setToolTip (tr (" Unit to show amounts in. Click to select another unit." ));
1019
1018
}
1020
1019
@@ -1059,7 +1058,7 @@ void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
1059
1058
/* * When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
1060
1059
void UnitDisplayStatusBarControl::updateDisplayUnit (int newUnits)
1061
1060
{
1062
- setText ( BitcoinUnits::name (newUnits));
1061
+ setPixmap ( QIcon ( " :/icons/unit_ " + BitcoinUnits::id (newUnits)). pixmap ( 31 ,STATUSBAR_ICONSIZE ));
1063
1062
}
1064
1063
1065
1064
/* * Shows context menu with Display Unit options by the mouse coordinates */
Original file line number Diff line number Diff line change @@ -34,6 +34,17 @@ bool BitcoinUnits::valid(int unit)
34
34
}
35
35
}
36
36
37
+ QString BitcoinUnits::id (int unit)
38
+ {
39
+ switch (unit)
40
+ {
41
+ case BTC: return QString (" btc" );
42
+ case mBTC : return QString (" mbtc" );
43
+ case uBTC: return QString (" ubtc" );
44
+ default : return QString (" ???" );
45
+ }
46
+ }
47
+
37
48
QString BitcoinUnits::name (int unit)
38
49
{
39
50
switch (unit)
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ class BitcoinUnits: public QAbstractListModel
36
36
static QList<Unit> availableUnits ();
37
37
// ! Is unit ID valid?
38
38
static bool valid (int unit);
39
+ // ! Identifier, e.g. for image names
40
+ static QString id (int unit);
39
41
// ! Short name
40
42
static QString name (int unit);
41
43
// ! Longer description
You can’t perform that action at this time.
0 commit comments