! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Hard to distinguish selected icons
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Andre Miranda editbugs 2017-06-01 05:14:47 CEST
Created attachment 7137 
Screenshot of gtk3-rebased branch

With xfdesktop 4.13 (I've been using the version from the gtk3-rebased branch), it's hard to tell which icons are selected and which ones aren't.
See the attached screenshots, the same icons are selected, I'm using Numix theme, but it's the same with Adwaita and Greybird.
By the way, the labels are also not transparent and with nice shadows, instead they have these opaque rounded rectangle.
Comment 1 Andre Miranda editbugs 2017-06-01 05:15:31 CEST
Created attachment 7138 
Screenshot of gtk2

Attached screenshot of gtk2 version
Comment 2 Andre Miranda editbugs 2017-06-01 05:23:50 CEST
Created attachment 7139 
Screenshot of xfdesktop-devel

I switched to the xfdesktop-devel package from AUR[1], but the results are even uglier :(

Although the selected icons are easier to distinguish, they are not red tinted according to theme styling (Numix). As a matter of fact, when using Adwaita the icons are completely black when selected.

1 - https://aur.archlinux.org/packages/xfdesktop-devel/
Comment 3 Andre Miranda editbugs 2017-06-01 05:26:09 CEST
Created attachment 7140 
Screenshot of xfdesktop-devel Adwaita

Screenshot of xfdesktop-devel Adwaita
Comment 4 ToZ editbugs 2017-06-01 12:25:06 CEST
With the Greybird theme, I use the following css (it's close to the gtk2 look):

/* Desktop Icons theming */
XfdesktopIconView.view {
	background-color: rgba(0,0,0,0.0);
	color: white;
}
XfdesktopIconView.view:active {
	background-color: rgba(57,142,231,0.75);
	color: rgba(57,142,231,0.75);
	border-radius: 5px;
}

XfdesktopIconView.rubberband {
	background-color: rgba(0,0,0,0.25);
}

XfdesktopIconView.view.label,
XfdesktopIconView.view.label:active {
	color: white;
	text-shadow: 1px 2px black;
}
Comment 5 Andre Miranda editbugs 2017-06-08 05:34:50 CEST
Thanks ToZ, this css snippet restores the previous style.
So, should this be a theme-wise fix or predefined in code? (Eric?)
Comment 6 Skunnyk editbugs 2017-06-21 22:48:24 CEST
*** Bug 13654 has been marked as a duplicate of this bug. ***
Comment 7 giovannicaligaris 2017-06-21 23:38:48 CEST
I just tried ToZ solution and it works great. I also think it's a theme issue instead.
Comment 8 Simon Steinbeiss editbugs 2017-06-22 07:58:57 CEST
This should somehow generically be solved within xfdesktop ideally. However, Gtk3 does not provide a good way of setting a fallback style without preventing themes from overriding.

Ideally we will find a standard class which we can add, which means it will look meaningful with most themes by default but still be overridable for themers.
Comment 9 Eric Koegel editbugs 2017-06-24 03:33:57 CEST
Created attachment 7189 
Use custom CSS for the iconview as a fallback

This patch looks for the theme to provide custom CSS for the XfdesktopIconView if that doesn't exist then we use ToZ's CSS to theme it. It also watches for theme changes and updates accordingly.
Comment 10 Eric Koegel editbugs 2017-06-25 09:05:43 CEST
Created attachment 7191 
Use custom CSS for the iconview as a fallback

This patch should apply properly. I didn't fully squash the last one.
Comment 11 ToZ editbugs 2017-06-25 11:57:11 CEST
I can confirm that this patch works.
Comment 12 Git Bot editbugs 2017-06-26 15:47:52 CEST
Eric Koegel referenced this bugreport in commit 7fc30fa0a31e94c1e15133ca347f950593b822a1

Use custom CSS for the iconview as a fallback (Bug #13609)

https://git.xfce.org/xfce/xfdesktop/commit?id=7fc30fa0a31e94c1e15133ca347f950593b822a1
Comment 13 Eric Koegel editbugs 2017-06-26 16:02:18 CEST
Thanks ToZ, marking this closed. If someone finds a better way feel free to reopen!
Comment 14 Simon Steinbeiss editbugs 2017-07-01 09:45:53 CEST
Created attachment 7209 
Fix text-shadow offset

Hi,

first of all I'm not 100% sure whether it's really a good idea not to have any label background by default as it may lead to unreadable text. Themes can do that but I would personally argue for the default style to keep a minimum of a11y friendliness (I think that was also the case in Gtk2 and themes had to specifically disable the label background).
Please note that the Gtk2 screenshot attached was not taken with Adwaita (which does not style Xfdesktop and would hence show the default style).

Secondly there is a mistake in the CSS. If you offset the text-shadow by 2px vertically there is a gap between the font and the its shadow which makes it less readable. I have corrected that in the attached patch.

If you agree with my argument from above I can also try to come up with a simple patch for the label giving it a meaningful style. Personally I would also refrain from setting the fallback selected color to blue as that will conflict with themes that don't use blue as selected bg color (looking at you, Mint). With the rubberband also being grey-based I would make the selected label background also just dark grey.

From a functional perspective the patch works nicely - well done Eric!
Comment 15 Ali Akcaagac 2017-07-01 15:11:10 CEST
An idea would be this:

Rather than fixing the fallback to a default color (blue or dark gray), wouldn't it be possible to "programmatically" adjust the color to the background color / wallpaper used ?

For solid background color a minimal brighter color (of the selected solid color) is being enforced.
For wallpapers something like a mean color (of the color spectrum used by the wallpaper) might be applied ?

Too overkill ?

Therefore the "background" style always matches to the corresponding solid color or wallpaper chosen. Makes also sense if wallpaper is being changed all couple of minutes/hours ... Same can be applied for the rubberband (selecting icons on the desktop)...
Comment 16 Git Bot editbugs 2017-07-02 04:26:02 CEST
Simon Steinbeiss referenced this bugreport in commit 4a016f7cedca751876e9e4869498dd54dbf0ef35

Improve text-shadow position of fallback style (Bug #13609)

https://git.xfce.org/xfce/xfdesktop/commit?id=4a016f7cedca751876e9e4869498dd54dbf0ef35
Comment 17 Eric Koegel editbugs 2017-07-02 05:23:46 CEST
I'm all for any improvements on the theming side, so Simon if you want to improve the current CSS colour choices/style I can push that and then push the programmatically chosen patch once Ali is finished with it.
Comment 18 Simon Steinbeiss editbugs 2017-07-04 01:01:13 CEST
(In reply to Ali Akcaagac from comment #15)
> An idea would be this:
> 
> Rather than fixing the fallback to a default color (blue or dark gray),
> wouldn't it be possible to "programmatically" adjust the color to the
> background color / wallpaper used ?
> 
> For solid background color a minimal brighter color (of the selected solid
> color) is being enforced.
> For wallpapers something like a mean color (of the color spectrum used by
> the wallpaper) might be applied ?
> 
> Too overkill ?

Yes.
The background of the label can use alpha transparency, so it already "adjusts" to the background and I can't think of a more meaningful way to do that tbh.

I'll try to take some more time in the next week to come up with some style proposal.
Comment 19 Simon Steinbeiss editbugs 2017-07-24 00:53:54 CEST
I've given the color choice a little more thought.
If we want to promote Adwaita as the Gtk+ standard and Xfce reference theme (which makes sense, as it comes with the toolkit), we should use their color-scheme for selection for the default theming.

If you dislike that idea I suggest we go with the gray tone that already makes up the rubberband.
Comment 20 Andre Miranda editbugs 2018-10-19 03:25:01 CEST
I proposed Greybird as the default Xfce 4.14 [1], some agreed and no one complained, so I guess that's the way to go.

@Simon can we close this or do you still want to tweak the style?

1 - https://mail.xfce.org/pipermail/xfce4-dev/2018-August/032151.html
Comment 21 Simon Steinbeiss editbugs 2018-10-24 21:55:51 CEST
Yes, I believe we can close the issue. The default style is fine now and creates readable results.
Comment 22 Theo Linkspfeifer editbugs 2019-06-17 15:24:10 CEST
Created attachment 8642 
Improve fallback CSS

I copied the CSS from Greybird and modified it so that theme colors are applied.
Comment 23 Andre Miranda editbugs 2019-06-17 15:51:29 CEST
(In reply to Theo Linkspfeifer from comment #22)
> Created attachment 8642 
> Improve fallback CSS
> 
> I copied the CSS from Greybird and modified it so that theme colors are
> applied.

Pushed to master:
https://git.xfce.org/xfce/xfdesktop/commit/?id=a028fb1

Thanks!

Bug #13609

Reported by:
Andre Miranda
Reported on: 2017-06-01
Last modified on: 2019-06-17
Duplicates (1):
  • 13654 Icons on desktop have white box on text (xfdesktop 4.13.1)

People

Assignee:
Eric Koegel
CC List:
6 users

Version

Version:
4.13.1

Attachments

Screenshot of gtk3-rebased branch (383.28 KB, image/png)
2017-06-01 05:14 CEST , Andre Miranda
no flags
Screenshot of gtk2 (417.10 KB, image/png)
2017-06-01 05:15 CEST , Andre Miranda
no flags
Screenshot of xfdesktop-devel (258.08 KB, image/png)
2017-06-01 05:23 CEST , Andre Miranda
no flags
Screenshot of xfdesktop-devel Adwaita (256.52 KB, image/png)
2017-06-01 05:26 CEST , Andre Miranda
no flags
Use custom CSS for the iconview as a fallback (3.90 KB, patch)
2017-06-24 03:33 CEST , Eric Koegel
no flags
Use custom CSS for the iconview as a fallback (3.80 KB, patch)
2017-06-25 09:05 CEST , Eric Koegel
no flags
Fix text-shadow offset (803 bytes, patch)
2017-07-01 09:45 CEST , Simon Steinbeiss
no flags
Improve fallback CSS (2.07 KB, patch)
2019-06-17 15:24 CEST , Theo Linkspfeifer
no flags

Additional information