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
42 stars 8 forks source link

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

Open smurphos opened 6 years ago

smurphos commented 6 years ago

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?

actionless commented 6 years ago

this won't look conistent enough with gtk2 theme

actionless commented 6 years ago

seems to be what in new gnome server-side decorations are using gtk3 theme (https://github.com/actionless/oomox/issues/123) so mb your idea could work fine

so let's try and see

smurphos commented 6 years ago

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

actionless commented 6 years ago

@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)

actionless commented 6 years ago

closed in #25

zonotope commented 6 years ago

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?

actionless commented 6 years ago

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

zonotope commented 6 years ago

@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?

actionless commented 6 years ago

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

zonotope commented 6 years ago

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?

actionless commented 6 years ago

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

actionless commented 6 years ago

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

smurphos commented 6 years ago

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

@define-color titlebar_bg_focused @dark_bg_color;
@define-color titlebar_bg_unfocused @dark_bg_color;
$titlebar_bg_focused: $dark_bg_color;
$titlebar_bg_unfocused: $dark_bg_color;

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.

smurphos commented 6 years ago

@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.

zonotope commented 6 years ago

@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.