themix-project/oomox-gtk-theme

Make "Unfocused Window Title/Header Bar backgrounds" behavior optional

smurphos opened this issue · 15 comments

How do you feel about having Window Title & Header bar backgrounds with a colour change depending on whether the window is focussed or not?

I've got some working patches for Metacity, GTK 3 and GTK 3.2 if you want me to PR them?

this won't look conistent enough with gtk2 theme

seems to be what in new gnome server-side decorations are using gtk3 theme (themix-project/themix-gui#123) so mb your idea could work fine

so let's try and see

I've used the amendments in some themes I've made and it seems to work fine both in GTK 3.18 builds and GTK 3.22 builds. These are GTK 3.18 screens. Will review the changes I made and PR - they do involve adding a couple of extra color definitions.

Nemo focussed
screenshot from 2018-02-16 05-40-33

Oomox-Gui focussed
screenshot from 2018-02-16 05-40-59

@smurphos good, it looks correct from the first glance

however 1 thing i've already noticed is what titlebar of inactive SSD window (Nemo in this case) have the color of window background, not window menu (like CSD, ie Oomox app in this case)

closed in #25

Hi. I (think) these changes are causing a problem I'm running into and I'm trying to find the way to turn this off or a workaround.

I would like both the focused and unfocused window title bars to be the same color, but I can't find any options in the oomox app to stop unfocused window titlebars from turning grey, or any options to set the unfocused window color.

Also, I've tried setting the wm_bg_unfocused color to the one I want as well as setting a new wm_bg color in the generated theme under ~/.themes/<theme name>/gtk-3.20/dist/gtk.css. to no avail.

What is the preferred way to make window title bars stay the same color whether or not the window is focused when using oomox themes?

@smurphos that can be implemented as bool option (like GTK3_GENERATE_DARK and others), what do you think?

@actionless an option to control this behavior in the oomox app would be ideal, but i'm also curious about how i could edit the generated theme as a temporary workaround to stop unfocused titlebars from changing colors. i've skimmed through the ~/.themes/<theme name>/gtk-3.20/dist/gtk.css, but none of the changes i made there seemed to have any effect.

is there a way i can edit the generated theme as a workaround?

just see what was changed in that PR in files mentioning title- and headerbar and revert those changes locally:
https://github.com/themix-project/oomox-gtk-theme/pull/25/files#diff-d5a9d8fe12baeb5eb2671b476596c47a

I tried reverted those changes by hand in the generated theme, but I couldn't get those changes to actually be applied. I think there's a build step that I'm missing.

I also tried to run the version of oomox before this change was introduced using this release, but I'm running into errors due to a missing file when I try to export the theme from the gui:

bash: /home/zonotope/oomox-1.5.0.5/plugins/theme_oomox/gtk-theme/change_color.sh: No such file or directory

Do you know where I can find that missing file so that I can run the older oomox version, or how to build the changes to the raw gtk theme so they get applied?

I tried reverted those changes by hand in the generated theme

you need to revert them in /opt/oomox/plugins/..., not in the generated theme itself

also still waiting for @smurphos feedback about making that behavior optional

Hi,

@zonotope

The quick fix to your local copy of oomox-gtk-theme should be to set $titlebar_bg_focused and $titlebar_bg_unfocused to the same color.

To do this

  • open /opt/oomox/plugins/oomox-gtk-theme/src/gtk-3.0/scss/_colors.scss
    Navigate to lines 36+37 and change to
@define-color titlebar_bg_focused @dark_bg_color;
@define-color titlebar_bg_unfocused @dark_bg_color;
  • open /opt/oomox/plugins/oomox-gtk-theme/src/gtk-3.0/scss/_global.scss
    Navigate to lines 58+59 and change to
$titlebar_bg_focused: $dark_bg_color;
$titlebar_bg_unfocused: $dark_bg_color;
  • Do the same for the files of the same names in the gtk-3.20/scss/ folder.

Finally to cover all bases as we don't know what window-manager you are running and which metacity theme version it uses open /opt/oomox/plugins/oomox-gtk-theme/src/metacity-2/metacity-theme-2.xml
Navigate to lines 12 & 13 and change to

<constant name="C_titlebar_focused" value="#%MENU_BG%" />
<constant name="C_titlebar_unfocused" value="#%MENU_BG%" />

metacity-theme-3.xml doesn't require editing as it's colors are derived from the gtk theme variables already fixed.

Having done that to your local copy the titlebar should remain the same background color on newly generated themes irrespective of focus. The text color will still vary.

@actionless Hi, apologies for the radio-silence. I think I mentioned free-time becoming a bit limited a few (maybe 4 or 5!) weeks ago..... ;-)

I don't see any problem with that being under an options flag other than the metacity-theme-2.xml file might be an issue. I'll have a play around with it this weekend.

@smurphos that worked, thanks.

in case google brings anyone else here, i had to modify the paths slightly to /opt/oomox/plugins/theeme_oomox/gtk-theme/... and restart gnome.