Bug 343389 - Coloring no longer works for svg elements with the hint-apply-color-scheme flag
Summary: Coloring no longer works for svg elements with the hint-apply-color-scheme flag
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 19:18 UTC by Mircea Kitsune
Modified: 2015-01-29 12:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mircea Kitsune 2015-01-27 19:18:39 UTC
I installed and briefly tested KDE Framework 5 on a machine running openSUSE 13.2 x64 from the repositories offered by the distribution. I found an issue with Plasma themes, plasmashell 5.2.0:

Coloring is no longer respected and applied for elements marked as colored. Vector images in a Plasma theme (typically panel backgrounds) can contain an object with the ID "hint-apply-color-scheme", which makes that element have the color specified in Configure Desktop -> Application Appearance -> Colors, typically the Window Background color. This works with the latest KDE4 plasma-desktop, but not the KDE5 plasmashell.

I tested this with my theme Colorbit, which is one of the fewer Plasma themes which supports coloring. I change color schemes frequently and enjoy being able to colorize the default panel and the background of widgets on the desktop. It would be appreciated if this can be fixed before KDE5 is defaulted by mainstream Linux distributions.

http://opendesktop.org/content/show.php?content=156954

Reproducible: Always

Steps to Reproduce:
1. Install a Plasma theme which supports color schemes, such as Colorbit.
2. Apply various color schemes, or simply change the Window Background color which normally controls Plasma colors.

Actual Results:  
svg elements with a hint-apply-color-scheme are no longer colored and stay gray.

Expected Results:  
In KDE4, the Window Background color is applied to these elements. Please fix or re-enable this in the Framework 5 plasmashell as well.
Comment 1 Mircea Kitsune 2015-01-27 22:11:12 UTC
I just tested to see if colored elements work for KWin themes (Aurorae), using the theme Air Oxygen Color: http://opendesktop.org/content/show.php?content=136510

Apparently they do: The buttons in this theme change color based on the color scheme, so the issue might only happen for plasmashell. It is however difficult to tell, because changing color schemes is broken in general: Sometimes the changes are completely ignored, while at other times they're only applied to new windows or take place on just certain elements. Even after I restart the computer and log back in, some colors in the new scheme are not applied yet! This might or might not be the same problem, but there are clearly many issues with color schemes in Framework 5.
Comment 2 Marco Martin 2015-01-28 17:22:46 UTC
Git commit bdda85a40deef288b7e8c82212f9c9b50a4ee0aa by Marco Martin.
Committed on 28/01/2015 at 13:45.
Pushed by gerrit into branch 'master'.

restore hint-apply-color-scheme support

make hint-apply-color-scheme work (kiconeffect based coloring),
and make sure the kcolorschemes are reloaded when app palette changes
and the theme follows system colors
Change-Id: I0a7a7eb0f89ed0948e618f1d608521f235aa1959

M  +1    -0    src/plasma/CMakeLists.txt
M  +5    -0    src/plasma/private/theme_p.cpp
M  +12   -1    src/plasma/svg.cpp

http://commits.kde.org/plasma-framework/bdda85a40deef288b7e8c82212f9c9b50a4ee0aa
Comment 3 Mircea Kitsune 2015-01-28 17:32:22 UTC
Thank you for the fix! Something I forgot to mention however, since I found out after creating this report: There seem to be multiple ways of colorizing SVG elements now, and hint-apply-color-scheme is just one method. I didn't test the others... but just to be safe, maybe someone can take a quick look in the code to make sure the others are still honored as well (for both Aurorae and Plasma). A full list of all color elements and their definitions exists here:

https://techbase.kde.org/Development/Tutorials/Plasma4/ThemeDetails#Using_system_colors
Comment 4 Mircea Kitsune 2015-01-29 01:39:25 UTC
I can confirm that the specific color elements are working for Aurorae themes, I tested ColorScheme-Background and ColorScheme-ViewHover. I will later check if they work for Plasmashell as well, although there are likely no more problems.
Comment 5 Marco Martin 2015-01-29 12:22:46 UTC
Git commit 534733558c76572a191b21ebe065d335843e2855 by Marco Martin.
Committed on 28/01/2015 at 13:45.
Pushed by mart into branch 'master'.

restore hint-apply-color-scheme support

make hint-apply-color-scheme work (kiconeffect based coloring),
and make sure the kcolorschemes are reloaded when app palette changes
and the theme follows system colors
Change-Id: I0a7a7eb0f89ed0948e618f1d608521f235aa1959

M  +11   -0    src/plasma/svg.cpp

http://commits.kde.org/plasma-framework/534733558c76572a191b21ebe065d335843e2855