Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon fixes #860

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ EXTRA_DIST += $(RES_RENDERED_ICON_SRC) $(RES_ALL_RENDERED_ICONS)
if CAN_RENDER_ICONS

qt/res/rendered_icons/about.png: qt/res/rendered_icons/about.svg
$(RSVG_CONVERT) -f png -d 142 -p 142 < $< | $(IMAGEMAGICK_CONVERT) - -crop 64x78+0+31 -bordercolor transparent -border 7x0 -colorspace Gray -strip $@
$(RSVG_CONVERT) -f png -d 142 -p 142 < $< | $(IMAGEMAGICK_CONVERT) - -bordercolor transparent -colorspace Gray -strip $@
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the image is already the full image, no need to crop and add a border.


qt/res/rendered_icons/about.svg: qt/res/src/bitcoin.svg
@$(MKDIR_P) $(@D)
Expand All @@ -739,14 +739,14 @@ qt/res/rendered_icons/bitcoin.ico: qt/res/rendered_icons/bitcoin32d8.gif $(patsu
$(IMAGEMAGICK_CONVERT) $^ $@

qt/res/rendered_icons/bitcoin_testnet.ico: qt/res/rendered_icons/bitcoin.ico
$(IMAGEMAGICK_CONVERT) $^ -modulate 100,87,9 $@
$(IMAGEMAGICK_CONVERT) $^ $@
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No modulating of color since this both looks bad and doesn't really apply.


qt/res/rendered_icons/nsis-wizard.svg: qt/res/src/bitcoin.svg
@$(MKDIR_P) $(@D)
sed '/fill="#000"/d' < $< > $@

qt/res/rendered_icons/nsis-wizard.bmp: qt/res/rendered_icons/nsis-wizard.svg
$(RSVG_CONVERT) -f png -d 360 -p 360 < $< | $(IMAGEMAGICK_CONVERT) - -crop 164x290+0+35 -border 0x12 -strip BMP3:$@
$(RSVG_CONVERT) -f png -d 360 -p 360 < $< | $(IMAGEMAGICK_CONVERT) - -strip BMP3:$@
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing cropping since the image is already cropped.


endif

Expand Down
45 changes: 28 additions & 17 deletions src/qt/res/src/bitcoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/qt/splashscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw

// draw the bitcoin icon, expected size of PNG: 1024x1024
int _32 = 32 / devicePixelRatio;
QRect rectIcon(QPoint(_32,-_32/2), QSize(pixmap.size().height()/devicePixelRatio+_32*2,pixmap.size().height()/devicePixelRatio+_32*2));
QRect rectIcon(QPoint(0, 0), QSize(pixmap.size().height()/(2*devicePixelRatio)+_32*2, pixmap.size().height()/(2 * devicePixelRatio)+_32*2));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving icon to upper left corner.


const QSize requiredSize(1024,1024);
QPixmap icon(networkStyle->getAppIcon().pixmap(requiredSize));
Expand Down