Skip to content

Commit a343aa4

Browse files
committed
Step #1
1 parent 4430744 commit a343aa4

File tree

8 files changed

+33
-3
lines changed

8 files changed

+33
-3
lines changed

src/qt/bitcoin.qrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<!DOCTYPE RCC><RCC version="1.0">
2+
<qresource prefix="/">
3+
<file>res/icon_theme/index.theme</file>
4+
<file>res/icon_theme/16x16/actions/bitcoin.png</file>
5+
<file>res/icon_theme/32x32/actions/bitcoin.png</file>
6+
</qresource>
27
<qresource prefix="/icons">
3-
<file alias="bitcoin">res/icons/bitcoin.png</file>
48
<file alias="address-book">res/icons/address-book.png</file>
59
<file alias="send">res/icons/send.png</file>
610
<file alias="connect_0">res/icons/connect0.png</file>

src/qt/bitcoingui.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <QApplication>
4444
#include <QComboBox>
4545
#include <QDateTime>
46+
#include <QDebug>
4647
#include <QDragEnterEvent>
4748
#include <QListWidget>
4849
#include <QMenu>
@@ -90,6 +91,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
9091
#ifdef ENABLE_WALLET
9192
enableWallet = WalletModel::isWalletEnabled();
9293
#endif // ENABLE_WALLET
94+
qInfo() << m_network_style->getTrayAndWindowIcon().availableSizes();
95+
9396
QApplication::setWindowIcon(m_network_style->getTrayAndWindowIcon());
9497
setWindowIcon(m_network_style->getTrayAndWindowIcon());
9598
updateWindowTitle();

src/qt/networkstyle.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,16 @@ NetworkStyle::NetworkStyle(const QString &_appName, const int iconColorHueShift,
7373
pixmap.convertFromImage(img);
7474
}
7575

76-
appIcon = QIcon(pixmap);
77-
trayAndWindowIcon = QIcon(pixmap.scaled(QSize(256,256)));
76+
appIcon = QIcon(pixmap);
77+
// trayAndWindowIcon = QIcon(pixmap.scaled(QSize(256, 256)));
78+
// trayAndWindowIcon.addPixmap(pixmap.scaled(QSize(128, 128)));
79+
// trayAndWindowIcon.addPixmap(pixmap.scaled(QSize(48, 48)));
80+
// trayAndWindowIcon.addPixmap(pixmap.scaled(QSize(32, 32)));
81+
// trayAndWindowIcon.addPixmap(pixmap.scaled(QSize(16, 16)));
82+
83+
QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << ":/res");
84+
QIcon::setThemeName("icon_theme");
85+
trayAndWindowIcon = QIcon::fromTheme("bitcoin");
7886
}
7987

8088
const NetworkStyle* NetworkStyle::instantiate(const std::string& networkId)
722 Bytes
Loading
1.9 KB
Loading
722 Bytes
Loading
1.9 KB
Loading

src/qt/res/icon_theme/index.theme

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Icon Theme]
2+
Name=bitcoin
3+
Comment=An original Bitcoin Core icon theme
4+
5+
Directories=16x16/actions,32x32/actions
6+
7+
[16x16/actions]
8+
Size=16
9+
Context=Actions
10+
Type=Fixed
11+
12+
[32x32/actions]
13+
Size=32
14+
Context=Actions
15+
Type=Fixed

0 commit comments

Comments
 (0)