Skip to content

Commit ee9018a

Browse files
author
evan82
committed
Merge pull request #600 from crowning-/UI_Enhancements
UI: theme-dependent icons/images Step 1
2 parents 356c616 + bf52871 commit ee9018a

12 files changed

+45
-102
lines changed

src/qt/addressbookpage.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
3535
ui->copyAddress->setIcon(QIcon());
3636
ui->deleteAddress->setIcon(QIcon());
3737
ui->exportButton->setIcon(QIcon());
38+
#else
39+
ui->newAddress->setIcon(QIcon(":/icons/add"));
40+
ui->copyAddress->setIcon(QIcon(":/icons/editcopy"));
41+
ui->deleteAddress->setIcon(QIcon(":/icons/remove"));
42+
ui->exportButton->setIcon(QIcon(":/icons/export"));
3843
#endif
3944

4045
switch(mode)

src/qt/forms/addressbookpage.ui

-16
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@
5959
<property name="text">
6060
<string>&amp;New</string>
6161
</property>
62-
<property name="icon">
63-
<iconset resource="../dash.qrc">
64-
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
65-
</property>
6662
<property name="autoDefault">
6763
<bool>false</bool>
6864
</property>
@@ -76,10 +72,6 @@
7672
<property name="text">
7773
<string>&amp;Copy</string>
7874
</property>
79-
<property name="icon">
80-
<iconset resource="../dash.qrc">
81-
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
82-
</property>
8375
<property name="autoDefault">
8476
<bool>false</bool>
8577
</property>
@@ -93,10 +85,6 @@
9385
<property name="text">
9486
<string>&amp;Delete</string>
9587
</property>
96-
<property name="icon">
97-
<iconset resource="../dash.qrc">
98-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
99-
</property>
10088
<property name="autoDefault">
10189
<bool>false</bool>
10290
</property>
@@ -123,10 +111,6 @@
123111
<property name="text">
124112
<string>&amp;Export</string>
125113
</property>
126-
<property name="icon">
127-
<iconset resource="../dash.qrc">
128-
<normaloff>:/icons/export</normaloff>:/icons/export</iconset>
129-
</property>
130114
<property name="autoDefault">
131115
<bool>false</bool>
132116
</property>

src/qt/forms/receivecoinsdialog.ui

-16
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@
140140
<property name="text">
141141
<string>&amp;Request payment</string>
142142
</property>
143-
<property name="icon">
144-
<iconset resource="../dash.qrc">
145-
<normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
146-
</property>
147143
</widget>
148144
</item>
149145
<item>
@@ -160,10 +156,6 @@
160156
<property name="text">
161157
<string>Clear</string>
162158
</property>
163-
<property name="icon">
164-
<iconset resource="../dash.qrc">
165-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
166-
</property>
167159
<property name="autoDefault">
168160
<bool>false</bool>
169161
</property>
@@ -263,10 +255,6 @@
263255
<property name="text">
264256
<string>Show</string>
265257
</property>
266-
<property name="icon">
267-
<iconset resource="../dash.qrc">
268-
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
269-
</property>
270258
<property name="autoDefault">
271259
<bool>false</bool>
272260
</property>
@@ -283,10 +271,6 @@
283271
<property name="text">
284272
<string>Remove</string>
285273
</property>
286-
<property name="icon">
287-
<iconset resource="../dash.qrc">
288-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
289-
</property>
290274
<property name="autoDefault">
291275
<bool>false</bool>
292276
</property>

src/qt/forms/rpcconsole.ui

-4
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,6 @@
413413
<property name="text">
414414
<string/>
415415
</property>
416-
<property name="icon">
417-
<iconset resource="../dash.qrc">
418-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
419-
</property>
420416
<property name="shortcut">
421417
<string notr="true">Ctrl+L</string>
422418
</property>

src/qt/forms/sendcoinsdialog.ui

+2-14
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@
616616
<rect>
617617
<x>0</x>
618618
<y>0</y>
619-
<width>830</width>
620-
<height>68</height>
619+
<width>828</width>
620+
<height>67</height>
621621
</rect>
622622
</property>
623623
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@@ -1257,10 +1257,6 @@
12571257
<property name="text">
12581258
<string>S&amp;end</string>
12591259
</property>
1260-
<property name="icon">
1261-
<iconset resource="../dash.qrc">
1262-
<normaloff>:/icons/send</normaloff>:/icons/send</iconset>
1263-
</property>
12641260
<property name="autoDefault">
12651261
<bool>false</bool>
12661262
</property>
@@ -1283,10 +1279,6 @@
12831279
<property name="text">
12841280
<string>Clear &amp;All</string>
12851281
</property>
1286-
<property name="icon">
1287-
<iconset resource="../dash.qrc">
1288-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
1289-
</property>
12901282
<property name="autoDefault">
12911283
<bool>false</bool>
12921284
</property>
@@ -1300,10 +1292,6 @@
13001292
<property name="text">
13011293
<string>Add &amp;Recipient</string>
13021294
</property>
1303-
<property name="icon">
1304-
<iconset resource="../dash.qrc">
1305-
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
1306-
</property>
13071295
<property name="autoDefault">
13081296
<bool>false</bool>
13091297
</property>

src/qt/forms/sendcoinsentry.ui

-20
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@
6363
<property name="text">
6464
<string/>
6565
</property>
66-
<property name="icon">
67-
<iconset resource="../dash.qrc">
68-
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
69-
</property>
7066
<property name="shortcut">
7167
<string>Alt+A</string>
7268
</property>
@@ -80,10 +76,6 @@
8076
<property name="text">
8177
<string/>
8278
</property>
83-
<property name="icon">
84-
<iconset resource="../dash.qrc">
85-
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
86-
</property>
8779
<property name="shortcut">
8880
<string>Alt+P</string>
8981
</property>
@@ -97,10 +89,6 @@
9789
<property name="text">
9890
<string/>
9991
</property>
100-
<property name="icon">
101-
<iconset resource="../dash.qrc">
102-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
103-
</property>
10492
</widget>
10593
</item>
10694
</layout>
@@ -621,10 +609,6 @@
621609
<property name="text">
622610
<string/>
623611
</property>
624-
<property name="icon">
625-
<iconset resource="../dash.qrc">
626-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
627-
</property>
628612
</widget>
629613
</item>
630614
</layout>
@@ -1157,10 +1141,6 @@
11571141
<property name="text">
11581142
<string/>
11591143
</property>
1160-
<property name="icon">
1161-
<iconset resource="../dash.qrc">
1162-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
1163-
</property>
11641144
</widget>
11651145
</item>
11661146
</layout>

src/qt/forms/signverifymessagedialog.ui

-32
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@
6060
<property name="text">
6161
<string/>
6262
</property>
63-
<property name="icon">
64-
<iconset resource="../dash.qrc">
65-
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
66-
</property>
6763
<property name="shortcut">
6864
<string>Alt+A</string>
6965
</property>
@@ -80,10 +76,6 @@
8076
<property name="text">
8177
<string/>
8278
</property>
83-
<property name="icon">
84-
<iconset resource="../dash.qrc">
85-
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
86-
</property>
8779
<property name="shortcut">
8880
<string>Alt+P</string>
8981
</property>
@@ -136,10 +128,6 @@
136128
<property name="text">
137129
<string/>
138130
</property>
139-
<property name="icon">
140-
<iconset resource="../dash.qrc">
141-
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
142-
</property>
143131
<property name="autoDefault">
144132
<bool>false</bool>
145133
</property>
@@ -157,10 +145,6 @@
157145
<property name="text">
158146
<string>Sign &amp;Message</string>
159147
</property>
160-
<property name="icon">
161-
<iconset resource="../dash.qrc">
162-
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
163-
</property>
164148
<property name="autoDefault">
165149
<bool>false</bool>
166150
</property>
@@ -174,10 +158,6 @@
174158
<property name="text">
175159
<string>Clear &amp;All</string>
176160
</property>
177-
<property name="icon">
178-
<iconset resource="../dash.qrc">
179-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
180-
</property>
181161
<property name="autoDefault">
182162
<bool>false</bool>
183163
</property>
@@ -270,10 +250,6 @@
270250
<property name="text">
271251
<string/>
272252
</property>
273-
<property name="icon">
274-
<iconset resource="../dash.qrc">
275-
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
276-
</property>
277253
<property name="shortcut">
278254
<string>Alt+A</string>
279255
</property>
@@ -300,10 +276,6 @@
300276
<property name="text">
301277
<string>Verify &amp;Message</string>
302278
</property>
303-
<property name="icon">
304-
<iconset resource="../dash.qrc">
305-
<normaloff>:/icons/transaction_0</normaloff>:/icons/transaction_0</iconset>
306-
</property>
307279
<property name="autoDefault">
308280
<bool>false</bool>
309281
</property>
@@ -317,10 +289,6 @@
317289
<property name="text">
318290
<string>Clear &amp;All</string>
319291
</property>
320-
<property name="icon">
321-
<iconset resource="../dash.qrc">
322-
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
323-
</property>
324292
<property name="autoDefault">
325293
<bool>false</bool>
326294
</property>

src/qt/receivecoinsdialog.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(QWidget *parent) :
3333
ui->receiveButton->setIcon(QIcon());
3434
ui->showRequestButton->setIcon(QIcon());
3535
ui->removeRequestButton->setIcon(QIcon());
36+
#else
37+
ui->clearButton->setIcon(QIcon(":/icons/remove"));
38+
ui->receiveButton->setIcon(QIcon(":/icons/receiving_addresses"));
39+
ui->showRequestButton->setIcon(QIcon(":/icons/edit"));
40+
ui->removeRequestButton->setIcon(QIcon(":/icons/remove"));
3641
#endif
3742

3843
// context menu actions

src/qt/rpcconsole.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ RPCConsole::RPCConsole(QWidget *parent) :
222222
ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export"));
223223
#endif
224224

225+
// Needed on Mac also
226+
ui->clearButton->setIcon(QIcon(":/icons/remove"));
227+
225228
// Install event filter for up and down arrow
226229
ui->lineEdit->installEventFilter(this);
227230
ui->messagesWidget->installEventFilter(this);

src/qt/sendcoinsdialog.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
3939
ui->addButton->setIcon(QIcon());
4040
ui->clearButton->setIcon(QIcon());
4141
ui->sendButton->setIcon(QIcon());
42+
#else
43+
ui->addButton->setIcon(QIcon(":/icons/add"));
44+
ui->clearButton->setIcon(QIcon(":/icons/remove"));
45+
ui->sendButton->setIcon(QIcon(":/icons/send"));
4246
#endif
4347

4448
GUIUtil::setupAddressWidget(ui->lineEditCoinControlChange, this);

src/qt/sendcoinsentry.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
3131
ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
3232
#endif
3333

34+
// These icons are needed on Mac also!
35+
ui->addressBookButton->setIcon(QIcon(":/icons/address-book"));
36+
ui->pasteButton->setIcon(QIcon(":/icons/editpaste"));
37+
ui->deleteButton->setIcon(QIcon(":/icons/remove"));
38+
ui->deleteButton_is->setIcon(QIcon(":/icons/remove"));
39+
ui->deleteButton_s->setIcon(QIcon(":/icons/remove"));
40+
3441
// normal dash address field
3542
GUIUtil::setupAddressWidget(ui->payTo, this);
3643
// just a label for displaying dash address(es)

src/qt/signverifymessagedialog.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) :
3030
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
3131
#endif
3232

33+
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
34+
ui->signMessageButton_SM->setIcon(QIcon());
35+
ui->clearButton_SM->setIcon(QIcon());
36+
ui->verifyMessageButton_VM->setIcon(QIcon());
37+
ui->clearButton_VM->setIcon(QIcon());
38+
#else
39+
ui->signMessageButton_SM->setIcon(QIcon(":/icons/edit"));
40+
ui->clearButton_SM->setIcon(QIcon(":/icons/remove"));
41+
ui->verifyMessageButton_VM->setIcon(QIcon(":/icons/transaction_0"));
42+
ui->clearButton_VM->setIcon(QIcon(":/icons/remove"));
43+
#endif
44+
45+
// These icons are needed on Mac also
46+
ui->addressBookButton_SM->setIcon(QIcon(":/icons/address-book"));
47+
ui->pasteButton_SM->setIcon(QIcon(":/icons/editpaste"));
48+
ui->copySignatureButton_SM->setIcon(QIcon(":/icons/editcopy"));
49+
ui->addressBookButton_VM->setIcon(QIcon(":/icons/address-book"));
50+
51+
3352
GUIUtil::setupAddressWidget(ui->addressIn_SM, this);
3453
GUIUtil::setupAddressWidget(ui->addressIn_VM, this);
3554

0 commit comments

Comments
 (0)