lah7 / gtk3-classic

Patches to bring back a traditional experience for GTK+3
Other
339 stars 24 forks source link

Request: Focus and outline #59

Closed luigifab closed 2 years ago

luigifab commented 2 years ago

What should be patched?

With GTK 3, the outline is not always displayed when a button, a scale or anything else has focus. It seems that is was displayed after pressing a navigation key (left, top, right, bottom, tab...) or?

In my theme, I replaced some outline with border. But this is not easy everywhere, because there is no border-offset (only outline-offset).

Screenshots

GTK 2.24: image

GTK 3.24: image

GTK 3.24 after pressing right/left arrows: image

Commits

I don't know.

luigifab commented 2 years ago

I think this is focus-visible.

image

When application start, default value is FALSE. From GTK 3.24: image

I will try to compile by adding a new env var here.

lah7 commented 2 years ago

Some possibly related commits for focus-visible:


I think it's more a theme thing. If it follows CSS style rules, outline-style, outline-offset and outline-color should control how it overlays the focused control, but some themes might use border which would affect spacing.

The second screenshot shows the outline very faint there, so the behaviour isn't broken. I confirm that random GTK apps under Breeze theme (Disks, file browser, Meld, jstest-gtk) do show the focused control initially (also confirmed in #65).

When I first saw this issue, I was thinking that it was a request to bring back this GTK+2 feel on focused controls:

image

A quick test on Ubuntu MATE 16.04 (GTK2), reveals nothing different with regards to initial focus behaviour. Pressing tab and/or arrow keys (depending what is focused) shows the outline, dependent on theme.