![]() ![]() This means, we now have the following state on Windows and macOS (light & dark mode) with the Frameworks 5.80 variant without any adaptions to the application code. The State on Windows & macOS (March 2021) Kate/Okular/Filelight have this already deployed. This was now merged for Frameworks 5.80 and the Craft blueprints already have it as patch. Interesting enough, KIconThemes already had a icon engine plugin, we just never registered it properly, as it was just thought for some serialization. Then this would work even if some theme name is set or the platform theme doesn't know about it. Unfortunately, as least without more hacks, this would have needed some application modification to setup it, here the boiler plate for Kate.Īfter some more research, be better idea came to mind: why not let Qt just use the KIconEngine always as icon engine for SVG icons? One first idea how to fix this was to bundle both light & dark theme and just switch between them on application palette change. Unfortunately, that will cease to work if you either set a theme via QIcon::setThemeName like we do for our resource hack or if you don't have this platform theme loaded, as is the case for Windows & macOS. On your typical Plasma Desktop this is the case, as the KdePlatformTheme will ensure that the KIconEngine is used as QIconEngine for your application. This works perfect, as long as the KIconLoader is at all used. The SVG Breeze icons are processed on load and adapted to the current palette. The icon coloring is handled by the KIconThemes Framework, too. Why does this inhibit the proper icon coloring? We went for this method years ago to ensure we don't need to deploy XXX individual files and to have no need for boiler plate code in the individual applications.Īs long as you link KIconThemes in some way, you are ready to go. It is open source, you can see all the awful stuff we do in no time =) If you need details, take a look in kicontheme.cpp and search for initRCCIconTheme. Some magic inside the KIconThemes Framework detects if such an icon theme resource file is around and does the needed setup to use that. The Breeze icons (the light variant usually) are installed inside the application bundle as binary Qt resource file.įor example the tooling will do this via Craft. This issue was known since long, we just had no time to tackle it.įirst, some generic info about how icon themes work on non-Unices for KDE Frameworks base application (at least if they have no own logic for that). ![]() How to fix these Icon Issue on Windows & macOS? and I assume most stuff we have around on, the Windows and macOS builds will show the above behavior if you get them to use dark mode at all. Thought, if you do no special handling, like in Kate/Okular/Filelight/. Some ship their own icons/styles/themes or will you just not let switch your theme to something dark. Naturally not all applications show these issues. Still, you end up with a program that has the most icons just close to invisible, as they stay black, even for dark themes. That was already rectified in Frameworks 5.75 as described here. The version there still had an old KTextEditor framework that didn't follow the global theme color to choose the matching KSyntaxHighlighting theme. This leads to unusable results like can be seen below in the screenshot taken 1:1 from this bug for Kate. The color is switched but the icons are not re-colored. Whereas the theme chooser in principle works even on Windows and macOS, one serious issue exists there: Unfortunately, the state on other platforms isn't that charming. The State on Windows & macOS (January 2021) Given one (at least me) only rarely switches the color theme, that seems "OK". To be honest, the 20.12 version of Kate did then still miss to update some colors like in the Documents pane, that is fixed in master and therefore with the upcoming 21.04.īut overall, even 20.12 works well, in the worst case, you need to restart your application to have properly applied themes. To create these, I even just switched between some light and dark Breeze themes on the fly via "Settings -> Color Scheme". Just take a look at these two screenshots of a light and dark mode Kate running on GNU Linux/X11 & Plasma Desktop. On the most Unices that use X11/Wayland and therefore are capable of running the full Plasma Desktop the state of light & dark themes and the accompanied icon themes is really good for KDE Frameworks based application. The State on X11/Wayland (more or less since a few years) Sunday, 7 March 2021 | Christoph Cullmann Cross Platform Light & Dark Themes and Icons ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |