Skip to content

Commit

Permalink
Add HiDPI theme for better scaling, hi-res displays
Browse files Browse the repository at this point in the history
Install SVG-based HiDPI theme alongside the PNG-based theme.
This should be used for better icon scaling, specifically when
Scaling is set to 2x or 3x. PNG may be a bit faster to load,
so the SVG HiDPI theme is optional.

Using the HiDPI theme will fix issues where the wrong icons are shown in
some places with scaling enabled (like the Places sidebars in file managers).
It should also fix and blurry icon issues, especially with scaling enabled.
The PNG non-HiDPI theme restricted the amount of zoom steps the icons had
in file managers with scaling enabled, so this should resolve that as well.

Fixes shimmerproject#124
Fixes shimmerproject#317
Fixes shimmerproject#362
Fixes shimmerproject#403
  • Loading branch information
newhoa committed Aug 24, 2024
1 parent a930cd3 commit 73d54d1
Show file tree
Hide file tree
Showing 2 changed files with 1,904 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ install:
install -d $(DESTDIR)/$(PREFIX)/share/icons
cp -rf build/elementary-xfce $(DESTDIR)/$(PREFIX)/share/icons
cp -rf build/elementary-xfce-dark $(DESTDIR)/$(PREFIX)/share/icons
cp -rf build/elementary-xfce-hidpi $(DESTDIR)/$(PREFIX)/share/icons;
@echo
@echo The icon-theme cache has not yet been regenerated, which means your changes may not be visible yet. Please run 'make icon-caches' next.

uninstall:
rm -rf $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce
rm -rf $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce-dark
rm -rf $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce-hidpi

icon-caches:
gtk-update-icon-cache -f $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce
gtk-update-icon-cache -f $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce-dark
gtk-update-icon-cache -f $(DESTDIR)/$(PREFIX)/share/icons/elementary-xfce-hidpi

test: builddir $(SUBDIRS)
chmod +x ./svgtopng/pngtheme.sh
Expand All @@ -41,6 +44,13 @@ builddir:
rm build/elementary-xfce/CONTRIBUTORS && cp CONTRIBUTORS build/elementary-xfce
rm build/elementary-xfce/LICENSE && cp LICENSE build/elementary-xfce
rm build/elementary-xfce/README.md && cp README.md build/elementary-xfce
mkdir -p build/elementary-xfce-hidpi && cp -R elementary-xfce/. build/elementary-xfce-hidpi
mv build/elementary-xfce-hidpi/index-hidpi.theme build/elementary-xfce-hidpi/index.theme
rm build/elementary-xfce-hidpi/AUTHORS && cp AUTHORS build/elementary-xfce-hidpi
rm build/elementary-xfce-hidpi/CONTRIBUTORS && cp CONTRIBUTORS build/elementary-xfce-hidpi
rm build/elementary-xfce-hidpi/LICENSE && cp LICENSE build/elementary-xfce-hidpi
rm build/elementary-xfce-hidpi/README.md && cp README.md build/elementary-xfce-hidpi
find build/elementary-xfce-hidpi -mindepth 1 -maxdepth 1 -type d -exec sh -c "ln -sr '{}' '{}'@2x" \; -exec sh -c "ln -sr '{}' '{}'@3x" \;

.PHONY: all $(SUBDIRS)

Expand Down
Loading

0 comments on commit 73d54d1

Please sign in to comment.