Bug 339863 - Full and empty stars are indistinguishable when using an icon theme (including Oxygen) that lacks the "rating-unrated" icon
Summary: Full and empty stars are indistinguishable when using an icon theme (includin...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
: 285781 341178 346711 385682 (view as bug list)
Depends on:
Blocks: 346972
  Show dependency treegraph
 
Reported: 2014-10-11 00:14 UTC by Antonio Rojas
Modified: 2023-12-10 11:18 UTC (History)
23 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
screenshot (2.23 KB, image/png)
2014-11-17 23:56 UTC, Hrvoje Senjan
Details
screenshot_v2 (1.38 KB, image/png)
2014-11-18 10:15 UTC, Hrvoje Senjan
Details
Dolphin 15.08 unrated view ratings Breeze from master 1 (89.77 KB, image/png)
2015-08-04 23:46 UTC, David M
Details
Dolphin 15.08 unrated view ratings Oxygen from master 1 (171.41 KB, image/png)
2015-08-05 00:02 UTC, David M
Details
Dolphin 15.08 unrated view ratings Oxygen from with new 3star file master 1 (201.19 KB, image/png)
2015-08-05 00:34 UTC, David M
Details
Dolphin 15.08 unrated view ratings Breeze from with new 3star file master 1 (87.52 KB, image/png)
2015-08-05 00:42 UTC, David M
Details
attachment-30832-0.html (2.09 KB, text/html)
2016-01-13 01:43 UTC, Marcelo Escobal
Details
Indistinguishable empty stars in Dolphin tooltips (22.04 KB, image/png)
2017-05-06 21:41 UTC, Elvis Angelaccio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2014-10-11 00:14:23 UTC
Baloo ratings are unusable when using the Breeze icon theme, as full and empty stars are indentical so one can't see file ratings.

Reproducible: Always
Comment 1 Andrew Lake 2014-10-11 06:53:24 UTC
It appears the effect used to show an "empty" star is to desaturate the rating (star) icon. The effect makes sense for hi color icon themes like oxygen. However, monochrome or greyscale icons are by definition desaturated so the effect doesn't result in any visible difference. We could add color to the rating icon in the Breeze icon theme but that would break the style guidelines for the icon theme, and might fairly be considered a band-aid for the ineffectiveness of the desaturation effect to correctly produce the desired "empty" star for monochrome and greyscale rating icons. One solution to the underlying problem might be to decrease the opacity as well.

I'll confirm that this a problem, but I think the underlying problem is in the components where ratings are displayed. I'm not entirely sure which components those are.
Comment 2 Bhushan Shah 2014-10-11 07:00:21 UTC
Quoting jpwhiting,

 <jpwhiting> heh kratingpainter takes the rating icon from the theme
and changes the image pixels to grayscale manually...
 <jpwhiting> strange
 <jpwhiting> works I guess, though I would think two opposite icons
would be better for accessibility
 <jpwhiting> so if gray is the foreground color as it seems in that bug

On Sat, Oct 11, 2014 at 12:23 PM, Andrew Lake <jamboarder@gmail.com> wrote:
> https://bugs.kde.org/show_bug.cgi?id=339863
>
> Andrew Lake <jamboarder@gmail.com> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |CONFIRMED
>      Ever confirmed|0                           |1
>                  CC|                            |jamboarder@gmail.com
>
> --- Comment #1 from Andrew Lake <jamboarder@gmail.com> ---
> It appears the effect used to show an "empty" star is to desaturate the rating
> (star) icon. The effect makes sense for hi color icon themes like oxygen.
> However, monochrome or greyscale icons are by definition desaturated so the
> effect doesn't result in any visible difference. We could add color to the
> rating icon in the Breeze icon theme but that would break the style guidelines
> for the icon theme, and might fairly be considered a band-aid for the
> ineffectiveness of the desaturation effect to correctly produce the desired
> "empty" star for monochrome and greyscale rating icons. One solution to the
> underlying problem might be to decrease the opacity as well.
>
> I'll confirm that this a problem, but I think the underlying problem is in the
> components where ratings are displayed. I'm not entirely sure which components
> those are.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
Comment 3 Andrew Lake 2014-10-11 07:29:03 UTC
Thanks much Bhushan. 

One option would be to provide a new icon for the non-filled state. The downside is that, except for breeze, no existing icon themes would have this new icon. So I think it might be better to fix the underlying problem in KRatingPainter.

My suggestion then is that the product for this bug be changed to frameworks-kwidgetaddons since, as described, the greyscale conversion alone won't produce a difference with any monochrome or greyscale icon sets. Unfortunately, I don't currently have bugzilla permissions to do this.
Comment 4 Antonio Rojas 2014-10-11 07:32:45 UTC
It should also be fixed in KDE4 then, affected applications are still not ported to KF5
Comment 5 Christoph Feck 2014-10-11 12:02:09 UTC
Please change assignee when moving bugs.
Comment 6 Christoph Feck 2014-10-11 13:37:21 UTC
Decreasing the opacity is already used for "disabled" widgets.

I would suggest to allow themes to specify a second image for the unrated star, such as "rating-unrated", which could be unfilled, while the regular "rating" would be a filled star.

Any other other possibilites? Does Gnome use different monochrome icons for ratings?
Comment 7 Jeremy Whiting 2014-10-11 20:09:15 UTC
I'm not sure if it's in use, but the Aditwa icon theme on my system has status/starred|non-starred|semi-starred|semi-starred-rtl icons.
Comment 8 Andrew Lake 2014-10-14 19:57:20 UTC
The VDG would be happy to side to provide additional empty star rating icon in the Breeze icon theme. Just let us know the name you want. :-)

My only question is would the required change to use the new icons in KRatingPainter work for other icon themes that do not have the new icons?
Comment 9 Christoph Feck 2014-10-26 15:48:38 UTC
Could you please commit a new icon "rating-unrated" for Breeze? I can then test code which uses this icon if available, and fall back to old method of desaturating when not available.
Comment 10 Andrew Lake 2014-10-26 17:36:42 UTC
A new "rating-unrated" icon has now been committed to breeze master.  Hope this helps and please let us know if there's anything else we can do from our end.

breeze repo commit: http://quickgit.kde.org/?p=breeze.git&a=commit&h=29c907e21d7b1fee218ce207dfbc44e27e816a02
Comment 11 Christoph Feck 2014-10-29 19:59:24 UTC
I have trouble getting Qt to accept the breeze icon theme. Using QIcon::setThemeName, either before or after QApplication creation, or even setting breeze as the default icon theme in systemsettings. In all cases, KRatingPainter only finds the oxygen yellow star, and returns false for QIcon::hasThemeIcon("rating-unrated").

It looks like Qt does not want to parse breeze's index.theme.
Comment 12 Christoph Feck 2014-10-29 23:30:54 UTC
https://git.reviewboard.kde.org/r/120902/
Comment 13 Andrew Lake 2014-10-30 15:25:13 UTC
I'm not sure what to do in the Breeze icon theme to make Qt recognize the icon. If anyone has a solution, please share it so I can update the Breeze icon theme.
Comment 14 Christoph Feck 2014-11-01 16:28:59 UTC
I am not entirely sure, but it is probably caused by some entries in index.theme saying "Fixed" type, while indeed they are all scalable.
Comment 15 Christoph Feck 2014-11-16 18:40:17 UTC
Git commit 9f618d0d45d5b9b2eb6f980f8956bbafc26eff04 by Christoph Feck.
Committed on 16/11/2014 at 18:39.
Pushed by cfeck into branch 'master'.

Support monochrome icon themes (such as breeze)

REVIEW: 120902
FIXED-IN: 5.5.0

M  +29   -12   src/kratingpainter.cpp

http://commits.kde.org/kwidgetsaddons/9f618d0d45d5b9b2eb6f980f8956bbafc26eff04
Comment 16 Hrvoje Senjan 2014-11-17 19:32:59 UTC
i'll check whether "FaenzaFlattr" is compliant, but now the exact same bug is present with that icon theme, after the above commit
Comment 17 Hrvoje Senjan 2014-11-17 19:34:14 UTC
the issue is now also present with oxygen icon theme
Comment 18 Christoph Feck 2014-11-17 20:36:32 UTC
Can you clarify? Are both icons colorful or both icons grayscale? I cannot reproduce with oxygen theme, it works fine with "rating-unrated" icon present and not present.
Comment 19 Hrvoje Senjan 2014-11-17 23:56:39 UTC
Created attachment 89623 [details]
screenshot

rating is now shown as 5star rating on unrated content (screenshot is with faenzaflattr)
which has: 
hrvoje@shumarija:~> find ~/.icons/FaenzaFlattr -name '*rating*' 
hrvoje@shumarija:~>

oxygen at least has:
find /usr/share/icons/oxygen/ -name '*rating*'
/usr/share/icons/oxygen/48x48/actions/rating.png
/usr/share/icons/oxygen/16x16/actions/rating.png
/usr/share/icons/oxygen/32x32/actions/rating.png
/usr/share/icons/oxygen/22x22/actions/rating.png

but same symptoms
Comment 20 Christoph Feck 2014-11-18 08:58:27 UTC
Could you try to change the tested icon name from "rating-unrated" to "norating"? I guess this has something to do with the KDE icon loader stating that "rating-unrated" icon exists, but actually only found the fallback icon "rating". The Qt icon loader seems to handle this correctly.
Comment 21 Christoph Feck 2014-11-18 09:01:10 UTC
diff --git a/src/kratingpainter.cpp b/src/kratingpainter.cpp
index 0bded43..f7d082d 100644
--- a/src/kratingpainter.cpp
+++ b/src/kratingpainter.cpp
@@ -65,8 +65,8 @@ QPixmap KRatingPainter::Private::getPixmap(int size, QIcon::State state)
         QIcon _icon(icon);
         if (_icon.isNull()) {
             if (state == QIcon::Off
-                && QIcon::hasThemeIcon(QLatin1String("rating-unrated"))) {
-                _icon = QIcon::fromTheme(QLatin1String("rating-unrated"));
+                && QIcon::hasThemeIcon(QLatin1String("norating"))) {
+                _icon = QIcon::fromTheme(QLatin1String("norating"));
                 // our theme provided a separate icon, no need to desaturate
                 toGray = false;
             } else {
Comment 22 Christoph Feck 2014-11-18 09:02:40 UTC
(and if this works in oxygen theme, we have to rename the icon in breeze theme, and test this too...)
Comment 23 Hrvoje Senjan 2014-11-18 10:15:36 UTC
Created attachment 89626 [details]
screenshot_v2

with norating, none of the 3 mentioned themes work correctly for unrated icon.

for unrated icon now there is shown unknown icon, and rated icon is shown correctly while hovering (it does not stick but that i guess could be a baloo bug)
Comment 24 Christoph Feck 2014-11-19 21:18:24 UTC
Reopening until we get this sorted out.
Comment 25 Bhushan Shah 2014-11-22 11:23:42 UTC
*** Bug 341178 has been marked as a duplicate of this bug. ***
Comment 26 Christoph Feck 2014-11-24 22:37:42 UTC
*** Bug 285781 has been marked as a duplicate of this bug. ***
Comment 27 Christoph Feck 2015-02-28 22:42:11 UTC
Can someone check version 5.8.0? A recent change to KIconThemes could affect detecting the icons using QIcon::hasThemeIcon().
Comment 28 Hrvoje Senjan 2015-03-01 00:10:02 UTC
the problem is still here with git master
Comment 29 Kishore 2015-03-21 06:46:58 UTC
kubuntu 15.04 just updated to 5.8 but the problem persists.
Comment 30 Andrew Lake 2015-03-28 20:33:06 UTC
The icon designer has updated the rating icon to be yellow instead of grey, so it should work with the traditional method of de-saturation like oxygen did. I'll mark as resolved.
Comment 31 Andrew Lake 2015-04-30 18:24:03 UTC
*** Bug 346972 has been marked as a duplicate of this bug. ***
Comment 32 Evert Vorster 2015-04-30 18:25:09 UTC
That was quick.

Thanks for pointing it out, and the support!


On 30 April 2015 at 20:24, Andrew Lake <jamboarder@gmail.com> wrote:
> https://bugs.kde.org/show_bug.cgi?id=339863
>
> Andrew Lake <jamboarder@gmail.com> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |evorster@gmail.com
>
> --- Comment #31 from Andrew Lake <jamboarder@gmail.com> ---
> *** Bug 346972 has been marked as a duplicate of this bug. ***
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 33 Andrew Lake 2015-04-30 18:25:47 UTC
*** Bug 346711 has been marked as a duplicate of this bug. ***
Comment 34 Hrvoje Senjan 2015-04-30 18:44:14 UTC
I'm not sure we should consider this as fixed.
1) the coloring problem is there with all icon themes except breeze (possibly oxygen also)
2) full and empty starts are still indistinguishable with breeze 5.3.x, only change with 5.3 is that there is a small decoloration when hovering over rating...
Comment 35 Myriam Schweingruber 2015-05-11 07:52:08 UTC
*** Bug 347484 has been marked as a duplicate of this bug. ***
Comment 36 David M 2015-08-04 23:09:08 UTC
Also happens with master currently with Breeze, Breeze-dark and Oxygen themes (with icons).
The stars are indistinguishable in Dolphin 15.08 (live) and Gwenview 15.08 (live).  Unfortunately this severely harms the utility of the baloo rating functions which are integrated into Gwenview and Dolphin (etc?) and it appears it will be in the next releases unless fixed soon (I'm using master recently synced).  I'm willing to help test in any way which would help things.

Using Gentoo kde-overlay (date in parenthesis is date pulled from git using 'smart-live-rebuild' and compiled)

kde-frameworks/kwidgetsaddons-9999 (01:24:58 PM 08/01/2015)
kde-apps/baloo-widgets-9999 (03:58:12 PM 08/03/2015)
kde-frameworks/baloo-9999 (04:50:14 PM 08/04/2015)
kde-frameworks/kfilemetadata-9999 (04:31:13 PM 08/04/2015)
kde-apps/dolphin-15.08.49.9999 (04:03:25 PM 08/03/2015)
kde-apps/dolphin-plugins-15.08.49.9999 (12:14:44 AM 07/31/2015)
kde-apps/gwenview-15.08.49.9999 (05:02:48 PM 08/04/2015)
kde-plasma/breeze-9999 (04:33:34 PM 08/04/2015)
kde-plasma/oxygen-9999 (11:15:55 PM 07/30/2015)
kde-apps/oxygen-icons-9999 (02:49:23 PM 07/27/2015)
Comment 37 Andrew Lake 2015-08-04 23:14:55 UTC
Can someone post a screenshot with the current state of things. As far as I'm aware everything that could be done on the artwork side, has been done.
Comment 38 David M 2015-08-04 23:46:12 UTC
Created attachment 93890 [details]
Dolphin 15.08 unrated view ratings Breeze from master 1

View of a file which is not rated at all.  Both the inline rating view from Dolphin and the information panel.  Both files are in fact unrated.  Breeze theme and icons selected for everything.
Comment 39 Andrew Lake 2015-08-04 23:52:06 UTC
Thanks much David. And if I understand your comment 36 correctly, the same thing is happening with Oxygen icons? Also, how does it look with a file that has been rated 3 stars?
Comment 40 David M 2015-08-05 00:02:42 UTC
Created attachment 93891 [details]
Dolphin 15.08 unrated view ratings Oxygen from master 1

Same view and files as before except with Oxygen theme and icons.  Both files are unrated and were just created for the test.  Both inline rating view and information panel view from Dolphin 15.08 pulled live from git.
Comment 41 Andrew Lake 2015-08-05 00:13:51 UTC
Thanks again David. It certainly doesn't look like a problem on the Breeze icon theme side.

Here's a link to the commits on the relevant code file:
http://quickgit.kde.org/?p=kwidgetsaddons.git&a=history&h=844f2186da569648532f5e985fbad5c51455a93c&f=src%2Fkratingpainter.cpp

I did a quick perusal but it wasn't obvious to my eyes what was wrong. Breeze doesn't have a rating-unrated icon so, best I can tell it should be following the code path to gray scale the icon. Maybe someone else with better developer eyes can spot the problem.
Comment 42 David M 2015-08-05 00:27:36 UTC
Andrew, I'm attempting to test with three stars but am having trouble verifying that the file is in fact rated using other means.  I am noticing some odd entries in the journal from baloo and probably should verify that the file is indexed properly with the rating.  But here is what I have for the screenshots which will follow with a new file 'testrated3.txt' which was rated 3 stars.  The Xattr data and balooshow appears to verify it but I'm not 100% sure.   Note I believe the rating is doubled and from 1-10 so a 3 star rating appears as "6".

----------

$ getfattr -d /home/david/test/testrated3.txt 
getfattr: Removing leading '/' from absolute path names
# file: home/david/test/testrated3.txt
user.baloo.rating="6"

---------

$ balooshow -x /home/david/test/testrated3.txt 
179302304648790039 23 41747071 /home/david/test/testrated3.txt
        Line Count: 1

Internal Info
Terms: Mplain Mtext T5 T8 Ttext X20-1 a is test this 
File Name Terms: Ftestrated3 Ftxt testrated3 txt 
XAttr Terms: R6 

lineCount: 1

------------

Will followup with breeze and oxygen screengrabs in next 20 minutes.
Comment 43 David M 2015-08-05 00:34:28 UTC
Created attachment 93892 [details]
Dolphin 15.08 unrated view ratings Oxygen from with new 3star file master 1

With addition of three star file view from Dolhin 15.08 from master git.  See comment #42.  Oxygen theme.
Comment 44 David M 2015-08-05 00:42:35 UTC
Created attachment 93893 [details]
Dolphin 15.08 unrated view ratings Breeze from with new 3star file master 1

See comment #42.  Screenshot with added "3 star" file and breeze theme and icons.  Dolphin 15.08 from master.
Comment 45 David M 2015-08-05 00:47:17 UTC
Andrew, Thanks for looking at it.  I'm afraid I'm not a developer so it's probably a bit out of my league.  I did think that it possibly had some related code in 'baloo-widgets' (and that is in fact where I thought the bug might be initially) but I am not sure.  Vishesh Handa, the baloo lead would probably know.  Someone might want to cc him?
Comment 46 David M 2015-09-03 15:16:03 UTC
It seems also (thanks to wolfi323 from the KDE forums)  that the information is actually being seen by Dolphin because (at least with the Breeze theme) if you mouseover the rightmost star it does (barely) display the actual star rating.  So the problem seems to be that it does not display when not mousing over.   Also it seems this is not just a corner case problem but is seen by many/all users:  https://forum.kde.org/viewtopic.php?f=154&t=127670
Comment 47 Michael D 2016-01-11 20:04:47 UTC
Any status on this? It happens with a number of different icon themes (e.g. Papirus included) in a number of different apps. I consider the rating feature to be quite an important one!
Comment 48 Marcelo Escobal 2016-01-13 01:43:46 UTC
Created attachment 96615 [details]
attachment-30832-0.html

I left KDE. Too many bugs. I work in health care and there's a lot of
things I must take care of. I need a more stable environment. Same happened
from KDE 3 to 4... I had to change all my workflow. I thought it wouldn't
happen again. I was wrong.

2016-01-11 17:04 GMT-03:00 Michael D via KDE Bugzilla <
bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=339863
>
> Michael D <nortexoid@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |nortexoid@gmail.com
>
> --- Comment #47 from Michael D <nortexoid@gmail.com> ---
> Any status on this? It happens with a number of different icon themes (e.g.
> Papirus included) in a number of different apps. I consider the rating
> feature
> to be quite an important one!
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 49 David M 2016-04-22 12:46:54 UTC
I'm happy to report that with the Breeze theme, KDE Applications 16.04 finally it appears for whatever reason that this bug is fixed and all star ratings now appear as they should.  Also I am using Plasma 5.6.3 and Frameworks 5.21.  I'm not sure if it is potentially the a reason for the fix or not but incidentally I was also finally able to remove baloo:4.  This is on a Gentoo system using the kde-overlay.
Comment 50 Wolfgang Bauer 2016-04-23 12:21:59 UTC
(In reply to David M from comment #49)
> I'm happy to report that with the Breeze theme, KDE Applications 16.04
> finally it appears for whatever reason that this bug is fixed and all star
> ratings now appear as they should. 

Actually, with breeze this is fixed since months. If it didn't work for you, you probably experienced a different problem, maybe this one: https://bugzilla.opensuse.org/show_bug.cgi?id=970896, which is indeed fixed in dolphin 16.04.

But the rating display is still completely broken with other themes (including oxygen) that don't provide a "rating-unrated" icon.

The reason is as suggested in comment#20:
(In reply to Christoph Feck from comment #20)
> I guess this has something to do with the KDE icon loader
> stating that "rating-unrated" icon exists, but actually only found the
> fallback icon "rating". The Qt icon loader seems to handle this correctly.

But, this is not a bug in the icon loader I think, that's how the behaviour is defined in the freedesktop icon name specification (https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#guidelines):
The dash “-” character is used to separate levels of specificity in icon names, for all contexts other than MimeTypes. For instance, we use “input-mouse” as the generic item for all mouse devices, and we use “input-mouse-usb” for a USB mouse device. However, if the more specific item does not exist in the current theme, and does exist in a parent theme, the generic icon from the current theme is preferred, in order to keep consistent style.

That implies that if "rating-unrated" doesn't exist in the current theme, "rating" (from the current theme) should be used instead.
So "rating-unrated" was actually a bad choice to begin with I think, and can't really work as intended IMHO.

But what about the most obvious and probably easiest "solution"?
Just add a "rating-unrated" icon to the oxygen theme.
That should fix the problem also for other themes, as oxygen is still used as fallback for missing icons in the currently configured icon theme.
Comment 51 Wolfgang Bauer 2016-04-23 12:30:41 UTC
(In reply to Wolfgang Bauer from comment #50)
> But what about the most obvious and probably easiest "solution"?
> Just add a "rating-unrated" icon to the oxygen theme.
> That should fix the problem also for other themes, as oxygen is still used
> as fallback for missing icons in the currently configured icon theme.

Forgot to mention that I tested this locally, it works great and fixes the problem.

Another option would probably be to revert https://quickgit.kde.org/?p=kwidgetsaddons.git&a=commit&h=9f618d0d45d5b9b2eb6f980f8956bbafc26eff04 and drop "rating-unrated", as breeze's rating icon is not monochrome any more.
That might of course cause problems with other themes that do contain a monochrome rating icon, but that was the state in KDE4 too.
Comment 52 Wolfgang Bauer 2016-04-23 13:42:44 UTC
PS, somehow related:
I think it would also be a good idea if kwidgetsaddons would actually ship with fallback icons for "rating" and "rating-unrated" (e.g. in an embedded .qrc).
Currently the rating stars do not show up at all here when running dolphin outside of Plasma (i.e. when KDE's icon loader is not used), because the "rating" icon is only present in breeze and oxygen (not hicolor).

This would also fix the problem with full and empty stars being undistinguishable if "rating-unrated" is missing in the theme.
Comment 53 Christoph Feck 2016-07-13 20:23:20 UTC
What is the status of this bug with frameworks from master? QIcon::hasThemeIcon() might again got fixed with yesterdays commit.
Comment 54 Wolfgang Bauer 2016-07-14 12:09:57 UTC
(In reply to Christoph Feck from comment #53)
> What is the status of this bug with frameworks from master?
> QIcon::hasThemeIcon() might again got fixed with yesterdays commit.

Unfortunately this commit didn't change anything regarding the rating widget.
In other words, this is still broken with oxygen (or any other theme that doesn't have rating-unrated).
Comment 55 Elvis Angelaccio 2017-05-06 21:41:55 UTC
Created attachment 105374 [details]
Indistinguishable empty stars in Dolphin tooltips

Not sure if related or a different issue, but the empty stars in KRatingWidget are invisible in the Dolphin's tooltips (with the default breeze theme).
Comment 56 Nate Graham 2017-10-13 03:52:42 UTC
*** Bug 385682 has been marked as a duplicate of this bug. ***
Comment 57 Nate Graham 2017-10-23 13:12:33 UTC
Is this actually still a bug with kwidgetsaddons? At this point shouldn't we just fix the icon themes?
Comment 58 funkybomber 2018-01-30 07:02:05 UTC
I have just posted a bounty for this bug. I'd like to see this fixed when the Oxygen Icon Theme is in use. 
Please note that I will need to see it solved in the KDE Neon Developer edition before I am ok with releasing the reward!
Happy coding! :)

https://www.bountysource.com/issues/54393195-full-and-empty-stars-are-indistinguishable-when-using-an-icon-theme-including-oxygen-that-lacks-the-rating-unrated-icon
Comment 59 andreas 2018-02-07 00:58:11 UTC
Git commit 221951952d22ae8d4b8b9d8dc90af53cf8401a92 by andreas kainz.
Committed on 07/02/2018 at 00:57.
Pushed by andreask into branch 'master'.

Add rating-unrated icon

A  +-    --    16x16/actions/rating-unrated.png
A  +-    --    22x22/actions/rating-unrated.png
A  +-    --    32x32/actions/rating-unrated.png
A  +-    --    48x48/actions/rating-unrated.png

https://commits.kde.org/oxygen-icons5/221951952d22ae8d4b8b9d8dc90af53cf8401a92
Comment 60 Wolfgang Bauer 2018-02-07 09:00:55 UTC
I still think it would be good to fix the underlying issue in the icon loader though.

And maybe add default icons to kwidgetaddons, Oxygen is no longer used as fallback since a while (and breeze neither)...
Comment 61 funkybomber 2018-02-17 06:16:26 UTC
The changes have not yet appeared in my KDE Neon Developer installation. Perhaps I need to follow some manual steps in order to get the changes on my system?

Also, which KDE package/release is the one that is supposed to include the fix? I would expect it to be Dolphin 18.04.
Comment 62 Christoph Feck 2018-02-17 07:28:55 UTC
The commit only added more Oxygen icons.
Comment 63 funkybomber 2018-02-17 07:41:54 UTC
There is also this co-related phabricator task which has been marked as "resolved" due to this latest commit from "andreask".

https://phabricator.kde.org/T7094

Is this commit not a proper solution for the Oxygen theme?
Comment 64 Christoph Feck 2018-02-17 14:53:16 UTC
It probably is the correct solution for the Oxygen theme (providing separate images is always better than faking them by reducing colors).

But I reopened this ticket, because it should also work for any other icon theme that does not provide separate images. It also needs to be tested to work with Qt's icon loader as well as KIconLoader.
Comment 65 Bug Janitor Service 2023-04-12 19:11:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/190
Comment 66 Felix Ernst 2023-09-07 11:44:51 UTC
Git commit e5ef8184db0733b944cb7a3c9ee1cf239035921b by Felix Ernst, on behalf of Felix Ernst.
Committed on 07/09/2023 at 13:35.
Pushed by felixernst into branch 'master'.

Fix file rating being unreadable in certain themes

Typically, a rating on a file is represented by five stars in a
row. If the first 3 stars are filled and the other 2 aren't, that
represents a 3/5 star rating.

When a theme only provides the filled stars (i.e. "rating") icon
but no unfilled stars (i.e. "rating-unrated") icon, KRatingPainter
would always paint all five stars as filled no matter if the actual
rating was 1/5 or 5/5 because the automatic fallback of the
"rating-unrated" icon is the "rating" icon as stated by the icon
theme spec.

This commit fixes this by having KRatingPainter use a generated
replacement "rating-unrated" icon (a de-saturated and grey-scaled
"rating" icon), if the theme does not provide a "rating-unrated"
icon already.

M  +10   -6    src/kratingpainter.cpp

https://invent.kde.org/frameworks/kwidgetsaddons/-/commit/e5ef8184db0733b944cb7a3c9ee1cf239035921b
Comment 67 Felix Ernst 2023-09-07 11:47:37 UTC
(In reply to funkybomber from comment #58)
> I have just posted a bounty for this bug. I'd like to see this fixed when
> the Oxygen Icon Theme is in use. 
> Please note that I will need to see it solved in the KDE Neon Developer
> edition before I am ok with releasing the reward!
> Happy coding! :)
> 
> https://www.bountysource.com/issues/54393195-full-and-empty-stars-are-
> indistinguishable-when-using-an-icon-theme-including-oxygen-that-lacks-the-
> rating-unrated-icon

I just looked into claiming the bounty but unfortunately the people running the bountysource page are now committing fraud, embezzling the money, and are no longer paying out bounties: https://github.com/bountysource/core/issues/1586

I originally found this bug through bounty source, and while 50€ isn't that much, hearing of one more fraud is still upsetting.

If you want to, you could still pay out the bounty to me directly, but after all these years and after the money you originally allocated being embezzled, I totally understand if you don't.

Here is my Paypal https://www.paypal.com/donate/?hosted_button_id=WTHAYDL59U9FL and my Liberapay https://liberapay.com/felixernst/donate .

In any case this should be fully fixed now for KDE frameworks 6. You can test it like this:

Test plan:

1. Either find a theme that only provides a "rating" icon but no "rating-unrated" icon, or temporarily rename all "rating-unrated" icons in your current theme:
sudo find /usr/share/icons/$THEMENAME/ -type f -regex '.*atin.*' -exec rename 's/rating-unrated/\(renamed\)rating-unrated/' {} \;
(You can later change it back using this command: sudo find /usr/share/icons/$THEMENAME/ -type f -regex '.*atin.*' -exec rename 's/\(renamed\)rating-unrated/rating-unrated/' {} \;)
2. Notice that the "rating" field in Dolphin in the information panel or in the "rating" column in details view now all show a five-star rating.
3. Do the same with a Dolphin using a KWidgetsAddons framework containing my fix. Notice everything is fine now.

Cheers!
Comment 68 Felix Ernst 2023-09-11 07:25:08 UTC
Git commit 2273405379815ce9a4c65619511849c3aa3b5a84 by Felix Ernst, on behalf of Felix Ernst.
Committed on 11/09/2023 at 09:25.
Pushed by felixernst into branch 'kf5'.

Fix file rating being unreadable in certain themes

Typically, a rating on a file is represented by five stars in a
row. If the first 3 stars are filled and the other 2 aren't, that
represents a 3/5 star rating.

When a theme only provides the filled stars (i.e. "rating") icon
but no unfilled stars (i.e. "rating-unrated") icon, KRatingPainter
would always paint all five stars as filled no matter if the actual
rating was 1/5 or 5/5 because the automatic fallback of the
"rating-unrated" icon is the "rating" icon as stated by the icon
theme spec.

This commit fixes this by having KRatingPainter use a generated
replacement "rating-unrated" icon (a de-saturated and grey-scaled
"rating" icon), if the theme does not provide a "rating-unrated"
icon already.


(cherry picked from commit e5ef8184db0733b944cb7a3c9ee1cf239035921b)

M  +10   -6    src/kratingpainter.cpp

https://invent.kde.org/frameworks/kwidgetsaddons/-/commit/2273405379815ce9a4c65619511849c3aa3b5a84
Comment 69 funkybomber 2023-12-09 11:17:12 UTC
(In reply to Felix Ernst from comment #67)
> (In reply to funkybomber from comment #58)
> > I have just posted a bounty for this bug. I'd like to see this fixed when
> > the Oxygen Icon Theme is in use. 
> > Please note that I will need to see it solved in the KDE Neon Developer
> > edition before I am ok with releasing the reward!
> > Happy coding! :)
> > 
> > https://www.bountysource.com/issues/54393195-full-and-empty-stars-are-
> > indistinguishable-when-using-an-icon-theme-including-oxygen-that-lacks-the-
> > rating-unrated-icon
> 
> I just looked into claiming the bounty but unfortunately the people running
> the bountysource page are now committing fraud, embezzling the money, and
> are no longer paying out bounties:
> https://github.com/bountysource/core/issues/1586
> 
> I originally found this bug through bounty source, and while 50€ isn't that
> much, hearing of one more fraud is still upsetting.
> 
> If you want to, you could still pay out the bounty to me directly, but after
> all these years and after the money you originally allocated being
> embezzled, I totally understand if you don't.
> 
> Here is my Paypal
> https://www.paypal.com/donate/?hosted_button_id=WTHAYDL59U9FL and my
> Liberapay https://liberapay.com/felixernst/donate .
> 
> In any case this should be fully fixed now for KDE frameworks 6. You can
> test it like this:
> 
> Test plan:
> 
> 1. Either find a theme that only provides a "rating" icon but no
> "rating-unrated" icon, or temporarily rename all "rating-unrated" icons in
> your current theme:
> sudo find /usr/share/icons/$THEMENAME/ -type f -regex '.*atin.*' -exec
> rename 's/rating-unrated/\(renamed\)rating-unrated/' {} \;
> (You can later change it back using this command: sudo find
> /usr/share/icons/$THEMENAME/ -type f -regex '.*atin.*' -exec rename
> 's/\(renamed\)rating-unrated/rating-unrated/' {} \;)
> 2. Notice that the "rating" field in Dolphin in the information panel or in
> the "rating" column in details view now all show a five-star rating.
> 3. Do the same with a Dolphin using a KWidgetsAddons framework containing my
> fix. Notice everything is fine now.
> 
> Cheers!

I have verified the patch working in the latest KDE Neon Unstable edition and I think it's only fair to release the bounty regardless of the whole Bountysource situation. I have made a 50€ payment (the initial bounty was for $50 but potato-potahto) so you should receive it (minus the Liberapay processing fees) soon. Thanks for your good work!
Comment 70 Felix Ernst 2023-12-10 11:18:53 UTC
(In reply to funkybomber from comment #69)
> I have verified the patch working in the latest KDE Neon Unstable edition
> and I think it's only fair to release the bounty regardless of the whole
> Bountysource situation. I have made a 50€ payment (the initial bounty was
> for $50 but potato-potahto) so you should receive it (minus the Liberapay
> processing fees) soon. Thanks for your good work!

It makes me happy to see my work being appreciated. I received the 50€. Thank you!

>(minus the Liberapay processing fees)

LiberaPay actually has zero fees (https://en.liberapay.com/about/faq) so I received the full amount.