themix-project/oomox-gtk-theme

Menu outline border

actionless opened this issue · 23 comments

cc @smurphos

i remember on one of the screenshots the menus had outlines (of the selected window border color)

i've actually thinking before about having the same type of border but with mix(menu_bg, menu_fg) color, what do you think about it?

this looks quite fine for me, what do you think?

diff --git a/src/gtk-3.20/scss/widgets/_menu.scss b/src/gtk-3.20/scss/widgets/_menu.scss
index 5815596..602ec90 100644
--- a/src/gtk-3.20/scss/widgets/_menu.scss
+++ b/src/gtk-3.20/scss/widgets/_menu.scss
@@ -82,6 +82,9 @@ $menu_borders_color: mix(
         background-color: $menu_bg_color;
         color: $menu_fg_color;

+        border: 1px solid mix($menu_bg_color, $menu_fg_color, .21);
+
+
         .csd & { border: 0; }  // axes borders in a composited env

         &:selected {

Hi,

Yep - the menu borders are jarring when there is a high contrast selected window border. I did have a look ages ago - I don't think I could work out were the border was coming from. If that fixes it all good!

btw on your screenshot i saw you had menu borders on gtk2, which values have you edited?

Screenshots here - #33?

They were from AWFs GTK3 view not GTK2

I've just installed gtk3-widget-factory in my main system so will use that in future for GTK3 screenshots.

i see now

i was trying several ways to get any borders on gtk2 theme menus, but haven't succeeded so far

not sure if it's good to add this to gtk3 theme only

Definitely get rid of the border in GTK3 - just make it transparent if nothing else. Doesn't look like it is possible to give the menu a border in murrine - I've just tried.

I'd also suggest turning off focus-style in HIDPI GTK2 - it produces some weird looking results with the oversized buttons - the glow is inside the button.

could you give some code and/or screeenshot examples of the latter problem?

Here you go - it's a problem on the larger buttons that take focus. The glow appears inside the button. This is clearlooks with current oomox-gtk-theme master. The quick cure is to set focusstyle = 0 at line 139

The other thing that's a bit off as-well is the oversize option menu button which is more oversize than the rest. Maybe we need a GTKOptionMenu style?

screenshot from 2018-03-27 06-26-45
screenshot from 2018-03-27 06-25-40

Another from GIMP - the glow is just inside the button border.

screenshot from 2018-03-27 06-38-31

do you know if that glow have some reasonable default value?
i don't like the idea of totally disabling it because it's important for keyboard accessibility

btw for gtk+3 the padding of that glow is configurable (not sure of i was porting it to gtk3.18), see the most top-right button:

2018-03-27-145551_2096x1112_scrot

2018-03-27-145344_2066x1112_scrot

oh, also it seems we need to remove (GTK3) label from Gradient option after you've implemented it for GTK+ 2

do you know if that glow have some reasonable default value?
i don't like the idea of totally disabling it because it's important for keyboard accessibility

For both hidpi and regular try

        GtkButton::focus-line-width = 1
        GtkButton::focus-padding = 0
	GtkButton::interior-focus = 0

&

        focusstyle = 2

screenshot from 2018-03-27 16-23-09
screenshot from 2018-03-27 16-25-22

This consistently looks good for me on both hidpi and regular in AWF and apps. It works nicely with the gradient on the buttons as-well

The same settings with an exterior dotted grey border focusstyle = 1 looks OK as-well.

I have just cottoned on why colored glow is acting different in the hidpi version. It is an interior glow by default and it is using the label border as it's edge. So the label needs the same xthickness and ythickness as the parent button to correctly place the exterior glow just inside the border of the whole button.

thanks for you investigation:

  1. i don't like other focus styles because they looking too much not in line with gtk3 button focus style
  2. thanks to your finding about GtkButton::interior-focus = 0 i can make it configurable; in combination with the current settings that option allows to do the same as current (GTK3) Focused button outline offset oomox GUI option do

like GtkButton::interior-focus = 0 if BTN_OUTLINE_OFFSET>=0 else GtkButton::interior-focus = 1

I still can't get focus-style = 3 to reliably display on the button border in all scenarios. I've been experimenting with using SPACING derived variables in GTK2 for xthickness and ythickness and it seems to work OK apart from highlighting the weird behaviour of focus-style = 3

focus-style = 2 set as an exterior focus in much better behaved.
focus-style = 3 doesn't work well as an exterior focus either for me

i was trying to say what in gtk3 we are able to configure two type of focus outline on the buttons:
#41 (comment) outside and inside the button

@smurphos so let's back to the original topic:
#41 (comment)

what do you think, if it's worth merging while it's not possible to implement that in gtk2?

Yep - I don't think we should let GTK2's limitations hold-back development of the GTK3 theme. The number of apps is relatively small and I think users that use those apps a lot probably have some awareness that they theme 'differently' in any case.

closed in 3e7865a