I've updated the description with everything I've learned about this
problem (thanks to gnome developers for helping me understand it) - I'm
by no means an expert on this so I can't really suggest a fix, but I do
know that you can write a rule which will directly set the background
and foreground colour for the MetaFrames class used by mutter, thus
setting the window decorations to whatever colour you want without
affecting anything else. I can't say if it is the best way or not but it
looks something like this:

MetaFrames:selected{
background-color:@selected_bg_color;
}

This has to go after all the other more generic rules of course, and
this doesn't make Human quite look the way it does in metacity - more
rules are needed.


** Description changed:

  See screenshot
  
  To reproduce:
  
  sudo apt-get install human-theme
  dconf-editor, set org.pantheon.desktop.gala.appearance.theme to "Human"
  Set Gtk+ widget theme to radiance.
+ 
+ Analysis:
+ 
+ When the window manager draws a metacity theme it looks at the gtk
+ colours defined in the Gtk+ theme set for widgets, rather than the theme
+ selected for window decorations. Thus, if you have Human window
+ decorations and Radiance widgets, it will use the Radiance theme to
+ determine the colour of the window decorations and the Human theme to do
+ the actual drawing.
+ 
+ The problem here is that there are two versions of each widget theme,
+ gtk2 and gtk3. Under gtk2 there is only one "background selected"
+ colour, which is the orange colour.
+ 
+ Under gtk3 however, you can set a different colour for each class of
+ widget using CSS rules.
+ 
+ The problem in mutter-theme-viewer: it uses a different widget class to
+ draw it's preview, therefore it uses a different set of CSS rules to
+ calculate which colours everything should be. This is why the theme
+ looks orange in the preview: the rule which resets the background to
+ white does not apply to the widget used in the preview.
+ 
+ The problem in light-themes: in Radiance/gtk-3.0/gtk-widgets.css there
+ is the following CSS rules:
+ 
+ *:selected,
+ *:selected:focused {
+     background-color: alpha (@selected_bg_color, 0.9);
+ 
+     color: @selected_fg_color;
+ }
+ 
+ .background {
+     background-color: @bg_color;
+     border-width: 0;
+ }
+ 
+ The first sets the background colour for any selected widget (including
+ window decorations both real and preview) to @selected_bg_color, which
+ is the expected orange.
+ 
+ The second sets the background of any item with "background" property
+ @bg_color. This is a white colour. This rule applies the real window
+ decorations of mutter but not the ones in the preview.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1090896

Title:
  metacity themes not coloured correctly

To manage notifications about this bug go to:
https://bugs.launchpad.net/gala/+bug/1090896/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to