themix-project / oomox-gtk-theme

Oomox-gtk-theme is a fork of Numix-gtk-theme with slightly different visual design choices and more customization capabilities. It can be used in Themix/Oomox app.
https://github.com/themix-project/oomox
GNU General Public License v3.0
43 stars 8 forks source link

Menu outline border #41

Closed actionless closed 6 years ago

actionless commented 6 years ago

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?

actionless commented 6 years ago

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 {
actionless commented 6 years ago

2018-03-26-015043_2496x1386_scrot

2018-03-26-015105_2496x1386_scrot

smurphos commented 6 years ago

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!

actionless commented 6 years ago

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

smurphos commented 6 years ago

Screenshots here - https://github.com/actionless/oomox-gtk-theme/issues/33?

They were from AWFs GTK3 view not GTK2

smurphos commented 6 years ago

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

actionless commented 6 years ago

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

smurphos commented 6 years ago

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.

actionless commented 6 years ago

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

smurphos commented 6 years ago

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

smurphos commented 6 years ago

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

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

actionless commented 6 years ago

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

actionless commented 6 years ago

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

actionless commented 6 years ago

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

smurphos commented 6 years ago

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

smurphos commented 6 years ago

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.

actionless commented 6 years ago

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

actionless commented 6 years ago

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

smurphos commented 6 years ago

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

actionless commented 6 years ago

i was trying to say what in gtk3 we are able to configure two type of focus outline on the buttons: https://github.com/actionless/oomox-gtk-theme/issues/41#issuecomment-376514461 outside and inside the button

actionless commented 6 years ago

@smurphos so let's back to the original topic: https://github.com/themix-project/oomox-gtk-theme/issues/41#issuecomment-376013706

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

smurphos commented 6 years ago

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.

actionless commented 6 years ago

closed in https://github.com/themix-project/oomox-gtk-theme/commit/3e7865a6a15cb38bf9e08121136cebbb5d89cc0b