Open DarkTrick opened 3 years ago
Given, that https://github.com/shimmerproject/Greybird/pull/303 will be accepted the change is very easy: in gtk-3/_common.scss
under %selected_items
, the following part
// don't differentiate between focussed and unfocussed widgets.
&:focus, &{
color: $selected_fg_color;
background-color: $selected_bg_color;
}
needs to become
color: $selected_fg_color;
background-color: $selected_bg_color;
&:focus {
color: $selected_focussed_fg_color;
background-color: $selected_focussed_bg_color;
}
And - accordingly - the values of the used variables must be adjusted.
At least in the Edge browser, when the URL bar has focus, the page selection is considered inactive (goes grey instead of the highlight color). It probably makes sense for us to do the same.
Thank you for the quick look-over. ~Your suggestion would be about a 6-character diff (selected-non-focussed color = selected backdrop color).~ Other voices?
I came up with these two. I can't decide which to take. I'm not a designer, so some input in coloring would really help :)
I'm all for the "easier to implement" version. It's still well-readable and a good improvement over what we have now.
Update: This is much more complicated than expected for certain cases.
No, it is not
~Is this behavior for mutliselection in a GtkListBox
(not TreeView) tolaerable, if everything else works fine in regard of this issue report?
~
At the moment, it seems impossible implement it for GtkListBox
, because
list
(GtkListBox's CSS class) will have no indicator, if one of its children is focused This is how a GtkListBox
would currently look like with multiselect:
This is a diff for the general change to only make focus
highlight
@@ -4500,13 +4500,12 @@ headerbar.selection-mode button.titlebutton,
%selected_items {
- // don't differentiate between focussed and unfocussed widgets.
- &:focus, &{
+ &:focus{
color: $selected_fg_color;
background-color: $selected_bg_color;
}
- &:backdrop {
+ &:backdrop, & {
color: $backdrop_selected_fg_color;
background-color: $backdrop_selected_bg_color;
}
@@ -4516,6 +4515,8 @@ headerbar.selection-mode button.titlebutton,
@if $variant == 'light' { outline-color: transparentize($selected_fg_color, 0.7); }
+ &:focus, &{ color: $selected_fg_color; }
+
&:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); }
&:backdrop {
This will style treeview
properly (difficult because of multiselect):
treeview:focus > treeview:selected
{
background: $selected_bg_color;
}
This will style Whiskermenu properly (in _xfce.scss
) (difficult, because whiskermenu kind of has two focused elements at the same time.):
#whiskermenu-window box :selected
{
color: $selected_fg_color;
background-color: $selected_bg_color;
}
// 1) focused row itself
row:focus {
background: $selected_bg_color;
}
// 2) every selected row BELOW the focused row
row:focus ~ row:selected {
background: $selected_bg_color;
}
// 3) every selected row ABOVE the focused row
// still searching (see problem description above)
Problem: Open gtk3-demo, page3, click in treeview in the top left, press tab, [label receives focus and turns blue], mouse-click in treeview again, label stays blue (label should loose the blue background).
Probably easy to solve; I'm still working on GtkListBox atm.
GTK3 does not support this feature for all widgets (namely the GtkListBox
list box is impossible to solve in GTK3).
GTK4 offers a solution for GtkListBox
es as well (:focus-within
).
Is it acceptable to
GtkListBox
es are always colored as if they have the focus.?
Here's an example from gtk3-demo.
I know this is an inconsistency, but at least all apps that don't involve GtkListBox
es wore more intuitive that way.
@DarkTrick I wasn't around for a while, if you still wanna fix this a PR would be appreciated! (I can live with the ListBox inconsistency)
From a thousand tabs I found this again. Thanks for the feedback @ochosi ! Unfortunately I have no resources at the time :(
If this thing stays unresolved long enough, I will eventually catch on to it again (OT: together with some other stuff)
Current situation
There's no differentiation in colors between the states
:selected
and:selected:focus
. This leads to something like this:Suggestion
Summary of the posts below: