How all this icon stuff is going to work in Plasma 6

Today I want to discuss in detail our plans for icon theming in Plasma 6. It will be rather technical, but may be of interest if you’re a user, developer, or theme author who wants to know what (if anything) you’ll have to do differently for Plasma 6.


Let’s start by briefly reviewing the way FreeDesktop-compatible icon themes work. Icons in icon themes are named with standardized names, like edit-copy. A list of standard names can be found here. When an app wants the icon for a “Copy” action, it uses the API of its toolkit to ask for a themed icon named edit-copy. In Qt, you use QIcon::fromTheme(). If an icon isn’t found by its name, the implementation is required to chop off the last word and try again. So if an app asks for edit-copy-path and an icon with that name isn’t found in the icon theme, it will look for edit-copy and return that instead. Icons can also come in multiple sizes, so that each icon can be optimized for being displayed at different sizes. There’s more to it than that, but it’s enough for now.

Over time, icon themes started doing something interesting: they changed the visual styling between sizes! For example in many icon themes, the symbolic monochrome style is used for icons’ 16px and 22/24px versions, and a full-color style is used for the 32px and larger versions. Breeze is one such icon theme. For example:

Now we have a problem. What if an app developer wants to display an icon at 32px size, and they want it to be symbolic even if if the theme has both symbolic and full-color versions of the same icon? There is actually no way of expressing this preference.

This was a common issue with icons in a Plasma Panel, which has a variable thickness. So when you were using the Breeze icon theme, any Panel widgets that asked for an icon present in the icon theme might become colorful if the panel was thicker than 32px (excluding padding). Some icons also only had full-color versions, and others only had symbolic versions, so the result was a jumble of visual styles on your Plasma Panel.

The old solution

Because this was primarily a problem in Plasma, in the past we solved it by shipping icons inside the Plasma style that overrode the icons in the system-wide icon theme. The Plasma-specific icons could be always symbolic at all sizes. Unfortunately there were many drawbacks:

  • The style of icons in the Plasma style might be different from the style of icons you chose for your System-wide icon theme, making unified theming impossible unless you also applied a matching icon theme made by the author of the Plasma theme.
  • Plasma themes often had only a few icons in them, meaning that most icons in Plasma respected your system icon theme, but some didn’t, and which ones didn’t was dependent on what Plasma theme you were using and how many icons it included. In practice it felt totally random.
  • Even when developers offered matching icon and Plasma themes, it was an easily-forgotten chore to remember to update the same icons in both places, causing them to get out of sync.
  • This solution required the use of different icon loading code between apps and Plasma, with subtly different behaviors, features, bugs, and performance characteristics–not to mention twice the maintenance.
  • Apps encounter the same issue, and this Plasma-specific solution doesn’t work for them.

For these reasons, we wanted to move away from this system in Plasma 6.

The new solution

For Plasma 6, icons in the Plasma theme will no longer be used even if they’re present. All icons in Plasma now come from the system-wide icon theme.

So how do we solve the above issue? Well, remember how the system falls back to an icon with a simpler name when it’s asked for an icon with a more complex name that isn’t found? The GNOME folks have used this feature to do something clever: they appended the -symbolic suffix to the end of their symbolic icons. Then when an app asks for, say, media-optical-audio-symbolic, it gets the symbolic version of the icon even if it’s being displayed at a large size such that otherwise it would get the full-color one.

For Plasma 6 we have adopted this convention as well for our Breeze icon theme. This isn’t an official part of the icon theme spec, but now that both GNOME and KDE do it, hopefully it shouldn’t be that hard to amend the spec to include it.

What it means for users

In Plasma 6, all icons in both your apps and Plasma will come from your icon theme. If you want your icons to look different, use a different icon theme.

What it means for app and Plasma developers

Anywhere in your app where you want the user to see a symbolic icon if the icon theme has one, append -symbolic to the end of the name of the icon that your app asks for. So yes, you’ll end up with a lot of git diffs like this:

Due to the name fallback behavior, this is a fully backwards-compatible and harmless change. So it’s not urgent to do this. But if you don’t, sometimes your users will see a full-color icon even though a symbolic one that you might prefer they see is available. So I encourage it!

What it means for icon theme authors

If your icon theme only has symbolic icons, or only has full-color icons, you don’t need to do anything.

If your theme has both symbolic icons and full-color icons, but there aren’t any icons that use different styles at different sizes, you don’t need to do anything. However do consider adding symbolic versions of your full-color icons that might get used on buttons, menu items, system tray items, and other places where people commonly expect to see symbolic icons. The filenames of the symbolic versions should end with the -symbolic suffix.

If your icon theme has any icons with symbolic versions at some sizes, and full-color versions at other sizes, you should create symlinks that end with the -symbolic suffix and point to the symbolic versions. Here’s an example of what we do in Breeze icons:

What it means for Plasma style authors

Don’t include icons in your Plasma 6 styles; they won’t be used. If you want your Plasma style to be accompanied by a distinctive matching icon style, bundle it in a Global Theme that also specifies the icon theme matching its style.

In conclusion

Nah, no conclusion needed. That’s all for today, folks!

34 thoughts on “How all this icon stuff is going to work in Plasma 6

  1. This sounds like a smart solution, and it has the added benefit that if you like me prefer colorful icons everywhere instead of symbolic ones you can convert any icon theme simply by removing all files that end with “symbolic”. 🙂

    Liked by 1 person

  2. More standardization is good. More cooperation between GNOME and KDE in general to make sure that eeeverything works just as well in either DEs, and hopefully any DE, is great.

    Liked by 1 person

  3. Will I have to option to change the tray icon size in KDE 6? Now the icons are bigger, than on Windows and eating more space. I use vertical taskbar, with the same width on Windoes
    I got 4 rows of icons, on KDE 5 only 3 rows.

    As well as the “start” button is a huge one. 😦

    Like

    1. You can already change the System Tray icon size. The options are “Small” (22px) or “Scales with panel size”.

      Like

    2. It’s available in Plasma 5. Open System Tray popup > Click on Configure Button > and then it’s right there in the window that appears.

      Like

    3. The fact that our System Tray does something slightly different from what Windows does isn’t surprising; we aren’t trying to make a perfect clone of Windows. That tightly-packed grid of 17 mixed-color icons in your Windows screenshot is giving me a headache already! That’s a great example of what *not* to do lol

      Like

    4. This is MY tray not YOURS and you do not decide what I want. Such arrogant way to listen to potential KDE user does not makes a good impression at all.

      In Windows I can hide those tray icons, but I want to see all of them to quick access and see the status of the programms.

      Like

    5. I’m sorry you’re unhappy that there are some differences between our System Tray and the Windows System Tray. Again, we’re not aiming to be a 1:1 clone of Windows, so some differences should be expected. That said, if you remove the Margins Separator widgets on your panel, you’ll find that your System Tray has more room horizontally and perhaps another column of icons will fit in there.

      We aren’t planning to support 16px system tray icons at typical Panel thicknesses because they’re generally too small to include enough detail and still remain recognizable without becoming a visually incoherent mess. Their click targets are also extremely small and so interactivity becomes challenging for a lot of people.

      Like

    6. hmmmm… Eugene, why do you not programming with, this is all open source and you be in able to make at the right places an account and programming with and make code extensions, like you want who the whole Users in the world then able to use it in your way….

      But so far do you not help with… and you only trolling around about some decisions, sould i extract your IP, check up your Login in the Internet at your Provider and extract your Homeadress for know, where i send the Police to your place for the police arresting you , because you speaks any huge nonsense , something can be happens, if you piss on the wrong programmer, because, programmers programming your open source programs for you , but they have also other skills 😉

      so….

      greetings..
      Blackcrack

      Like

    1. Icon themes get to determine their own fallback themes, so it’s up to them.But if no fallback theme is specified (which is an error on the part of the icon theme), it will fall back to Breeze, yeah.

      Like

  4. This decision makes me sad. One of the reasons for me to select KDE at the time was ability to have a Plasma and system tray icons (bluetooth, network, etc) close to the decade of my MacOS UX scars, which made my transition much smoother.

    I never expected for plasma themes to support and have all possible and most recent apps, and always thought such expectation was unreasonable.
    This is what `PapirusDevelopmentTeam/papirus-icon-theme` is for.

    I wish for fresh, yet un-red-eyed, users to still have an ability to theme their plasma icons in sync with plasma theme without hours of googling, debugging and juggling icon files around.

    Like

    1. In Plasma 6, you will still be able to have exactly what you want: just choose a systemwide icon theme of your choice and all icons will come from that icon theme. Panel and System Tray icons will prefer symbolic icons if they are available. I expect there will be a transition period before all icon themes add the required symlinks and extra symbolic versions, but I do expect it to happen fairly quickly, especially for large and popular icon themes like Papirus.

      Like

    2. *thumpsup* Nate

      Bobby, you can go in the Systemsettings, open the Iconselector and you be in able for
      klicking the Button, for download other Iconthemes, then can you search a papirus-icon theme, or an other Mac Like Icontheme and can feel like Home in at a Mac, this works already .., now also in Plasma6 also in the Systemtray, like Ned it told.. and you should also happy with this decision… i be an German with bad English knowledge, but this have i understand also 😉
      Or take a translator …. *brig grin*
      best regards
      Blacky

      Like

  5. While I’m glad work is being done to unify the plasma and system icon theming, the solution to use monotone vs colored icons does not make sense to me. For the best visual design, you want icons to be designed for the size that they display at. If you display one scalable symbolic icon at all sizes, it just doesn’t look as good. Wouldn’t it be better to have two prefixes such as -monotone and -colored which would each fallback to the original if unspecified? In summary I’d argue, symbolic scaling and mono/color are separate issues.

    Like

    1. Icon themes can have multiple size-optimized versions of symbolic icons. In the Breeze icon theme, we typically have optimized versions for the 16px and 22px sizes for symbolic icons, but there’s nothing stopping us from adding 32px, 48px, 64px, and larger versions of our symbolic icons.

      However after a certain point there are diminishing return because symbolic vector icons scale up well, even on low DPI screens.

      Like

  6. Hi,
    Nice to see some simplification here. I was womdering: isnt’t the chop off logic causing nonexistent symbolic special version to fall back to a non-sumbolig generic?

    E.g. edit-copy-path-symbolic will fall back to edit-copy (without the symbolic postfix?)

    Like

    1. Yeah, this came to mind as well while I was writing the post. We may need to adjust the fallback logic in KIconLoader.

      Like

    1. I might be misunderstanding, but you can already do that by simply switching from one icon theme to another.

      Like

    2. I would also like some kind of option to choose whether to use symbolic icons or not. A good example would be materia-kde plasma theme. It has two variants, one symbolic and one colorful. From what I understand, if we were to use the recommended Papirus icon theme, we would need 2 versions of the icon themes (symbolic and colorful). So I see an option to “use symbolic icons” as a better solution.

      Like

  7. i cordially invite you to have a look at my scaled icon themes, everything is scaled up and down, all icons were previously 256 icons png’s, which are now packed in svg
    and in kde you can only scale up or down, which bothers me a bit, in kde the icons are not scaled the same way as in gnome, in gnome the icon image looks much cleaner and there are no disturbances at the top of the folder if you look closely , this is not the case in gnome, the scaling is perfectly implemented there, with the same icon theme..

    search easy for “blacky” in pling, store.kde.org and all other stores where be opendesktop depended.. https://www.pling.com/u/Blackcrack

    i don’t like the thing with icon-name-symbolic, so an extra work on more as 2000 icons, let it be only 1000 -symbolic icons, but it is a extra work and take also time for some unnessary automatic scaled icons, i copy easy the whole normal name-blubb icons to name-blubb-symbolic…
    that’s about “-symbolic” icons.. but it’s only my opinion… *sniff ;)*

    but i be very haappy bout the desission to take from 6.0 aaaall icons out of the theme.. and not extra black/white .. (noppehh.. , i don’t say anything “bad” words about).. in the last Years.. it was easy horrible .. and i have start to use linux cince 1999 and have the become with the start of Mandrake with Gael (greetings at this Point) and .. ah jea, i have there something become via Mail :

    =================================================================
    Le vendredi 26 avril 2013 08:24:24, vous avez écrit :
    > Hi,
    >
    > i have so far over 60% from the History and Adventure in the Wiki,
    > if you want help, do it and complete it furter… , now can you say
    > thank you to Gaël Duval with you Alias unter the tanks write
    >
    > http://wiki.openmandriva.org/en/The_Adventure#Say_thank_you_to_Ga.C3.ABl_Du
    > val_for_this_Distribution_and_founding_.28Alias_only_.2Fsign._to_big_.2Ag.2
    > A.29

    At Solutions Linux 2004 (Paris), i had together in front of me Gaël Duval and
    Joël Bernier (Linux-Kheops / Les logiciels du soleil / RedHat). Both have
    confirmed me this:
    « In 1998, Joël sent a Redhat 5.1 to Gaël and this is the start point of the
    adventure. Without this shipment, Mandrake would not be born. »

    Please insert it in the wiki and publish it. My mail was rejected and I have
    no time to search the reason…


    Pierre Jarillon – http://pjarillon.free.fr/
    Vice-président de l’ABUL : http://abul.org
    Microsoft is for computers what McDonald is for French gastronomy

    ==========================================================

    i have become with, all this times and has become with how was had developed with Mandrake and.. KDE i was at the Linuxday’s a in Stuttgard https://www.blackysgate.de/files/folder-root/LT2000 and at 2001 and have become with the whole developing with Mandrake and Mandriva.. .. but was mostly in the background and at ftp and the files ..

    oky, maby a bit over info.. but must easy out..

    and i be very happy about to become the whole themes again root-like like it should be.. all out of the theme-folders !
    a big fad Thank you ! i be very happy about and i am look forward what’s there maby comes..

    a lil please, could anyone make a Cube-desktop as plugin for download from pling/store.kde.org ?
    this Cube was ones of the best things was happens on KDE-Desktop as Workspace changer, it should have a come back as plugin for Plasma.. this was one of the innovatived Desktop-changer what i have become with in the last 10 Years, please, make any one a packet of “Desktop Cube” for plasma..

    all the best
    Blacky

    blackysgate.de —===<<>>===—

    Like

    1. If your icon theme doesn’t have different symbolic and full color versions for different *sizes* of the same icons, then you don’t need to do anything. The whole “symlink to -symbolic” thing is only needed for the symbolic styles of icons that *also* have full-color versions at different sizes.

      Like

  8. *thumpsup * :))

    the thing with linking it’s niice… “if [ … ” in loop ln -s .. *giggle*
    okey, then no extra datas (makes the packet only more fad) 🙂
    thy for the info.. it’s really usable 🙂

    best
    Blacky

    Like

  9. Regarding the different icon sizes, I never understood what happened to the promising vector icons that were so much talked about a few years ago, since PNGs of different sizes are still being used.

    SVGs were supposed to put an end to the problem of having to make icons in different sizes and also to make the scaling of desktop elements less “coarse” since, being vector graphics, they did not have to go abruptly from 22 px to 32 px but could perfectly have, say, 23 or 28 pixels, allowing much more granularity and freedom in the configuration that each user deemed appropriate for his or her taste.
    Was this immobility due to technical problems, or simply because nobody was interested enough, or for some other reason…?

    Regards.

    Like

    1. hmm.. i use svg’s only, but there be png’s packed into, but the scaling it’s pretty well
      so far .. if you download the iconset manually from pling (if you search for “blacky”)
      can you check out the themepacket and extract in a “working” folder or you install it and go into $HOME/.local/share/icons there should be your downloaded Iconthemes and you can also rename different icons, i have put extra icons into for custimmicing the theme a bit, like the “link” icon and some other.. if you brows a bit in my icon themes do you see what you can change for make it for you more constable like you want.. .. and others can make pure scg icons as theme.. but it’s not so mine, because it’s so “comiklike” and the icons from Win10 and 11 be more Weblike, because the way is going to the cloud in Win112 ans win 365 or like it names.. in 1 / 2 years bet i am , the whole Windowsusers whant “because the Savety and Security” will press in the Clouds with the Orderingsystem,so be you personally files no more at home, nope, it’Äs on a cloud from an Forighner Factoy where be in able to brothering your files..

      because i support reactos very hot in advertising for more Programmers to have later an Open Source WinNT for free (free beer like, no dollars to pay) and not independed from an Single Factory.. and from an Whole state wheres exist laws who determine to must have backdoors.. but this is an other Adventure .. Peoples, help Reactos to have a real free WinNT OS.
      Reactos need’s Programmers for more faster finish to use..
      So, enough sneak advertising 😉

      well, back to the Topic.. svg is full in work and is taked…

      best
      Blacky

      Like

    2. Ah, wow, I did not think there was such a problem with that nowadays. After all, text rendering, especially letters with diagonal lines, have always had serrated edges due to the impossibility of “drawing half a pixel” on a screen; and yes, it is true that years ago, with the screens so bad back then, it was tiring to read a lot of text with serrated edges, but since the Full-HD screens, not to mention UHD, even the most bizarre typography is seen perfectly, almost as if it were printed on paper (on a 4k screen, of course).

      That problem you mention with icons, is it still valid in modern screens, with more than 150 ppi in many cases, or is it another of those problems that have not been reviewed for 25 years? I’m really surprised that the problem ceased to exist for text but icons are still affected. But well, I’m no expert, that’s why I ask.

      Like

    3. Text renders better than monochrome line-art SVGs because of font hinting and sub-pixel anti-aliasing support built into fonts themselves, which plugs into font rendering engines that read these data and draw the text appropriately given the DPI, pixel grid arrangement, etc. It’s quite sophisticated.

      In principle it would be possible to build an icon rendering engine that implemented these features, and then our icons could implement hinting internally to took into that. It would be an absolutely enormous undertaking, though. Font rendering is *not* a simple topic!

      I think this is the reason you see an industry-wide push to get icons into fonts, or to use Emojis as icons. It lets you re-use these features already present in font rendering engines, so “all you have to do” (as if it was easy!) is built the hinting support into your font-based icons.

      If we did this, we would no longer be following the FreeDesktop icon spec and all Linux apps would have to change to look up icons in fonts, and all Linux toolkits in existence would have to build in support for it. It might be possible to build in compatibility shims so that looking up an icon by its old name would find the right icon in the icon font based on migrating the legacy names. And then the way you switch icon themes is by actually changing your icon *font*. So all existing icon themes would also need to be converted.

      So as you can see… it would be a lot of work. 🙂

      Like

Leave a comment