Skip to content

Conversation

@nephros
Copy link
Contributor

@nephros nephros commented May 28, 2024

This took me way longer to figure out than should be necessary.

  • Just use SAILFISH_SVG2PNG for theme icons
  • Package any theme location
  • Hardlink the icon source, add README
  • Add svg to installs
  • Fix packaging

Background: Sailfish OS 4.6 changes the default path for "theme" icons, such as
the ones used for Settings plugins (which we are).

Additionally, the layout of the source dir for svgs to convert has changed or
the sailfish-svg2png tool.

This drops amost all of src/icons/icons.pro, as that was a verbatim copy of the
upstream sailfish-svg2png .prf file, and just uses that prf file as intended.

I haven't checked, but this may mean we lose some of the icon scales for older
packages, but it should't realy make a noteworthy difference.

@Olf0
Copy link
Contributor

Olf0 commented May 29, 2024

Thanks for the fixup. I really start to hate them for doing such breaking changes as altering arbitrary names regularly.

I will try to take a look at it and comprehend what you researched and implemented (I may need this for other projects, too) next weekend.

@b100dian
Copy link
Contributor

Thanks for the quick fix!

@nephros
Copy link
Contributor Author

nephros commented Jun 2, 2024

I will try to take a look at it and comprehend what you researched and implemented (I may need this for other projects, too) next weekend.

Yes, but only those ones which actually use the /usr/share/themes location. Most packages use /usr/share/icons which is not affected.
On my main system the only non-jolla packages that use the themes location are patchmanager, some I wrote on my own, and some originally written by coderus (like screencast).

find /usr/share/themes/sailfish-default/ -type f |xargs rpm -qf|sort -u

In case you need it, these are the steps:

  1. if a .pro file is used, change it to the four-line version:
TEMPLATE = aux
# Configures svg to png
THEMENAME=sailfish-default
CONFIG += sailfish-svg2png
  1. in the svgs subfolder, create the subdirs icons and icons-monochrome, and copy or link the original svg image there
  2. adjust the %files path in the .spec to the "many asterisks" variant: %{_datadir}/themes/*/*/z*/*/*.png

Copy link
Contributor

@Olf0 Olf0 left a comment

Choose a reason for hiding this comment

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

LGTM

@nephros nephros merged commit 2afc2f1 into sailfishos-patches:master Jun 18, 2024
elros34 added a commit to elros34/patchmanager that referenced this pull request Sep 25, 2024
@nephros nephros deleted the icons46 branch November 15, 2024 07:43
@nephros nephros restored the icons46 branch November 26, 2024 09:05
@nephros nephros deleted the icons46 branch November 26, 2024 09:47
@nephros nephros added this to the 3.2.12 milestone Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants