[gnome-themes-standard] windows decorations: made metacity theme for fallback look like the mutter theme and fixed maximized



commit 9711130922bf2ee5235b077b535f061d46a761d7
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Fri Apr 29 16:31:28 2011 +0200

    windows decorations: made metacity theme for fallback look like the mutter theme and fixed maximized windows titlebar height for both mutter and metacity theme.

 themes/Adwaita/metacity-1/metacity-theme-2.xml |  427 ++++++++++++++++++------
 themes/Adwaita/metacity-1/metacity-theme-3.xml |    7 +-
 2 files changed, 335 insertions(+), 99 deletions(-)
---
diff --git a/themes/Adwaita/metacity-1/metacity-theme-2.xml b/themes/Adwaita/metacity-1/metacity-theme-2.xml
index 8b2a8d3..6d21d88 100644
--- a/themes/Adwaita/metacity-1/metacity-theme-2.xml
+++ b/themes/Adwaita/metacity-1/metacity-theme-2.xml
@@ -12,14 +12,14 @@
 
 <constant name="C_border_focused" value="blend/#000000/gtk:bg[NORMAL]/0.6" />
 <constant name="C_border_unfocused" value="blend/#000000/gtk:bg[NORMAL]/0.8" />
-<constant name="C_titlebar_focused_hilight" value="gtk:text[SELECTED]" />
-<constant name="C_titlebar_unfocused" value="blend/#ffffff/gtk:bg[NORMAL]/0.4" />
+<constant name="C_titlebar_focused_hilight" value="gtk:base[NORMAL]" />
+<constant name="C_titlebar_unfocused" value="blend/gtk:base[NORMAL]/gtk:bg[NORMAL]/0.4" />
 <constant name="C_title_focused" value="blend/gtk:fg[NORMAL]/gtk:bg[NORMAL]/0.1" />
-<constant name="C_title_focused_hilight" value="gtk:text[SELECTED]" />
+<constant name="C_title_focused_hilight" value="gtk:base[NORMAL]" />
 <constant name="C_title_unfocused" value="blend/gtk:text[NORMAL]/gtk:bg[NORMAL]/0.9" />
 <!-- color of the button icons -->
 <constant name="C_icons_focused" value="gtk:text[SELECTED]" />
-<constant name="C_icons_focused_pressed" value="gtk:text[SELECTED]" />
+<constant name="C_icons_focused_pressed" value="#ffffff" />
 <constant name="C_icons_unfocused" value="blend/gtk:text[NORMAL]/gtk:bg[NORMAL]/0.9" />
 <constant name="C_icons_unfocused_prelight" value="gtk:bg[NORMAL]" />
 <constant name="C_icons_unfocused_pressed" value="blend/#000000/gtk:bg[NORMAL]/0.7" />
@@ -34,13 +34,13 @@
 	<distance name="bottom_height" value="2" />
 	<distance name="left_titlebar_edge" value="0"/>
 	<distance name="right_titlebar_edge" value="0"/>
-	<distance name="title_vertical_pad" value="11"/>
-	<border name="title_border" left="10" right="10" top="1" bottom="1"/>
-	<border name="button_border" left="0" right="0" top="1" bottom="3"/>
+	<distance name="title_vertical_pad" value="10"/>
+	<border name="title_border" left="10" right="10" top="1" bottom="2"/>
+	<border name="button_border" left="0" right="0" top="1" bottom="2"/>
 	<aspect_ratio name="button" value="1"/>
 </frame_geometry>
 
-<frame_geometry name="normal_unfocused" title_scale="medium" parent="normal">
+<frame_geometry name="normal_unfocused" title_scale="medium" rounded_top_left="4" rounded_top_right="4" parent="normal">
 	<distance name="left_titlebar_edge" value="1"/>
 	<distance name="right_titlebar_edge" value="1"/>
 </frame_geometry>
@@ -50,12 +50,23 @@
 	<distance name="right_width" value="0" />
 	<distance name="left_titlebar_edge" value="0"/>
 	<distance name="right_titlebar_edge" value="0"/>
-	<distance name="title_vertical_pad" value="10"/>
-	<border name="title_border" left="10" right="10" top="1" bottom="1"/>
-	<border name="button_border" left="0" right="0" top="0" bottom="3"/>
+	<distance name="title_vertical_pad" value="9"/> <!-- 
+							This needs to be 1 less then the
+							title_vertical_pad on normal state
+							or you'll have bigger buttons 								-->
+	<border name="title_border" left="10" right="10" top="1" bottom="2"/>
+	<border name="button_border" left="0" right="0" top="0" bottom="2"/>
 	<distance name="bottom_height" value="0" />
 </frame_geometry>
 
+<frame_geometry name="tiled_left" title_scale="medium" rounded_top_left="false" rounded_top_right="false" parent="max">
+	<distance name="right_width" value="1" />
+</frame_geometry>
+
+<frame_geometry name="tiled_right" title_scale="medium" rounded_top_left="false" rounded_top_right="false" parent="max">
+	<distance name="left_width" value="1" />
+</frame_geometry>
+
 <frame_geometry name="small" title_scale="small" parent="normal" rounded_top_left="false" rounded_top_right="false">
 	<distance name="title_vertical_pad" value="7"/>
 	<border name="title_border" left="10" right="10" top="0" bottom="1"/>
@@ -70,7 +81,7 @@
 <frame_geometry name="nobuttons" hide_buttons="true" parent="normal">
 </frame_geometry>
 
-<frame_geometry name="borderless" has_title="false" hide_buttons="true" parent="normal" rounded_top_left="false" rounded_top_right="false">
+<frame_geometry name="borderless" has_title="false" rounded_top_left="false" rounded_top_right="false" parent="normal" >
 	<distance name="left_width" value="1" />
 	<distance name="right_width" value="1" />
 	<distance name="bottom_height" value="1" />
@@ -79,8 +90,8 @@
 	<distance name="title_vertical_pad" value="1" />
 </frame_geometry>
 
-<frame_geometry name="modal" title_scale="small" hide_buttons="true" rounded_top_left="false" rounded_top_right="false" parent="small">
-	<distance name="title_vertical_pad" value="5"/>
+<frame_geometry name="modal" title_scale="small" hide_buttons="true" parent="normal">
+	<distance name="title_vertical_pad" value="0"/>
 </frame_geometry>
 
 <!-- drawing operations -->
@@ -88,15 +99,18 @@
 	<!-- title -->
 
 <draw_ops name="title_focused">
-	<title x="(0 `max` ((width - title_width) / 2)) + 3" y="(0 `max` ((height - title_height) / 2)) + 2"
-		color="C_title_focused_hilight" />
-	<title x="(0 `max` ((width - title_width) / 2)) + 2" y="(0 `max` ((height - title_height) / 2)) + 1"
-		color="C_title_focused" />
+	<title x="(0 `max` ((width - title_width) / 2)) + 3"
+               y="(0 `max` ((height - title_height) / 2)) + 2"
+               color="C_title_focused_hilight" />
+	<title x="(0 `max` ((width - title_width) / 2)) + 2"
+               y="(0 `max` ((height - title_height) / 2)) + 1"
+               color="C_title_focused" />
 </draw_ops>
 
 <draw_ops name="title_unfocused">
-	<title x="(0 `max` ((width - title_width) / 2)) + 2" y="(0 `max` ((height - title_height) / 2)) + 1"
-		color="C_title_unfocused"/>
+	<title x="(0 `max` ((width - title_width) / 2)) + 2"
+               y="(0 `max` ((height - title_height) / 2)) + 1"
+               color="C_title_unfocused"/>
 </draw_ops>
 
 	<!-- window decorations -->
@@ -111,7 +125,7 @@
 
 <draw_ops name="titlebar_fill_focused">
 	<gradient type="vertical" x="0" y="0" width="width" height="height">
-		<color value="blend/gtk:bg[NORMAL]/#ffffff/0.4" />
+		<color value="blend/gtk:bg[NORMAL]/gtk:base[NORMAL]/0.4" />
 		<color value="gtk:bg[NORMAL]"/>
 		<color value="blend/gtk:bg[NORMAL]/#000000/0.03" />
 		<color value="blend/gtk:bg[NORMAL]/#000000/0.06" />
@@ -120,18 +134,10 @@
 
 <draw_ops name="titlebar_fill_focused_alt">
 	<gradient type="vertical" x="0" y="0" width="width" height="height">
-		<color value="blend/gtk:bg[NORMAL]/#ffffff/0.4" />
-		<color value="gtk:bg[NORMAL]"/>
-		<color value="blend/gtk:bg[NORMAL]/#000000/0.03" />
-		<color value="gtk:bg[NORMAL]" />
-	</gradient>
-</draw_ops>
-
-<draw_ops name="titlebar_fill_focused_alt2"> <!-- gradient for attached and modal dialogs titlebar-->
-	<gradient type="vertical" x="0" y="0" width="width" height="title_height">
+		<color value="blend/gtk:bg[NORMAL]/gtk:base[NORMAL]/0.6" />
+		<!-- <color value="gtk:bg[NORMAL]"/> -->
+		<!-- <color value="blend/gtk:bg[NORMAL]/#000000/0.03" /> -->
 		<color value="gtk:bg[NORMAL]"/>
-		<color value="blend/gtk:bg[NORMAL]/#ffffff/0.4" />
-		<color value="gtk:bg[NORMAL]" />
 	</gradient>
 </draw_ops>
 
@@ -167,12 +173,13 @@
 	<include name="hilight" />
 </draw_ops>
 
-<draw_ops name="titlebar_focused_alt"> <!-- titlebar for attached and modal dialogs -->
-	<include name="titlebar_fill_focused_alt2" />
+<draw_ops name="titlebar_focused_alt">
+	<include name="titlebar_fill_focused_alt" />
+	<include name="hilight" />
 </draw_ops>
 
 <draw_ops name="rounded_titlebar_focused">
-	<include name="titlebar_fill_focused" />
+	<include name="titlebar_fill_focused_alt" />
 	<include name="rounded_hilight" />
 </draw_ops>
 
@@ -213,6 +220,34 @@
 	<arc color="C_border_unfocused" x="width-10" y="0" width="9" height="9"  start_angle="0" extent_angle="90" />
 </draw_ops>
 
+<draw_ops name="border_right_focused">
+	<line
+		x1="width-1" y1="0" 
+		x2="width-1" y2="height" 
+		color="C_border_focused" />
+</draw_ops>
+
+<draw_ops name="border_right_unfocused">
+	<line
+		x1="width" y1="0" 
+		x2="width" y2="height" 
+		color="C_border_unfocused" />
+</draw_ops>
+
+<draw_ops name="border_left_focused">
+	<line
+		x1="0" y1="0" 
+		x2="0" y2="height" 
+		color="C_border_focused" />
+</draw_ops>
+
+<draw_ops name="border_left_unfocused">
+	<line
+		x1="0" y1="0" 
+		x2="0" y2="height" 
+		color="C_border_unfocused" />
+</draw_ops>
+
 	<!-- button icons-->
 
 <constant name="C_icons_shadow" value="blend/#000000/gtk:bg[NORMAL]/0.6" />
@@ -273,6 +308,8 @@
 
 <draw_ops name="close_focused">
 	<include name="close_shadow_focused" y="1" />
+	<!-- I'm not happy with the current aa I'll draw it twice to make it darker -->
+	<include name="close_shadow_focused" y="1" />
 	<include name="close_glyph_focused" />
 </draw_ops>
 
@@ -309,6 +346,7 @@
 
 <draw_ops name="close_unfocused">
 	<include name="close_glyph_unfocused" y="D_icons_unfocused_offset" />
+	<include name="close_glyph_unfocused" y="D_icons_unfocused_offset" />
 </draw_ops>
 
 <draw_ops name="close_glyph_unfocused_prelight">
@@ -340,6 +378,7 @@
 
 <draw_ops name="close_unfocused_prelight">
 	<include name="close_glyph_unfocused_prelight" y="D_icons_unfocused_offset" />
+	<include name="close_glyph_unfocused_prelight" y="D_icons_unfocused_offset" />
 </draw_ops>
 
 <draw_ops name="close_glyph_unfocused_pressed">
@@ -371,6 +410,7 @@
 
 <draw_ops name="close_unfocused_pressed">
 	<include name="close_glyph_unfocused_pressed" y="D_icons_unfocused_offset" />
+	<include name="close_glyph_unfocused_pressed" y="D_icons_unfocused_offset" />
 </draw_ops>
 
 <draw_ops name="maximize_glyph_focused">
@@ -601,10 +641,119 @@
 	<include name="menu_glyph_unfocused_pressed" y="D_icons_unfocused_offset" />
 </draw_ops>
 
+<draw_ops name="shade_glyph_focused">
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_focused" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_focused" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_focused" />
+	<rectangle 
+		x="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_focused" />
+</draw_ops>
+
+<draw_ops name="shade_shadow_focused">
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_shadow" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_shadow" />
+</draw_ops>
+
+<draw_ops name="shade_focused">
+	<include name="shade_shadow_focused" y="1" />
+	<include name="shade_glyph_focused" />
+</draw_ops>
+
+<draw_ops name="shade_focused_pressed">
+	<include name="shade_glyph_focused" y="1" />
+</draw_ops>
+
+<draw_ops name="shade_glyph_unfocused">
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_unfocused" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_unfocused" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_unfocused" />
+	<rectangle 
+		x="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_unfocused" />
+</draw_ops>
+
+<draw_ops name="shade_unfocused">
+	<include name="shade_glyph_unfocused" y="D_icons_unfocused_offset" />
+</draw_ops>
+
+<draw_ops name="shade_glyph_unfocused_prelight">
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_unfocused_prelight" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_unfocused_prelight" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_unfocused_prelight" />
+	<rectangle 
+		x="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_unfocused_prelight" />
+</draw_ops>
+
+<draw_ops name="shade_unfocused_prelight">
+	<include name="shade_glyph_unfocused_prelight" y="D_icons_unfocused_offset" />
+</draw_ops>
+
+<draw_ops name="shade_glyph_unfocused_pressed">
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+D_icons_shrink-D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_unfocused_pressed" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="height-(height-height%3)/3-2-D_icons_shrink+D_icons_grow" 
+		width="width-2*(width-width%3)/3-2*D_icons_shrink+2*D_icons_grow" height="2" filled="true"
+		color="C_icons_unfocused_pressed" />
+	<rectangle 
+		x="(width-width%3)/3+D_icons_shrink-D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_unfocused_pressed" />
+	<rectangle 
+		x="width-(width-width%3)/3-2-D_icons_shrink+D_icons_grow" y="(height-height%3)/3+3+D_icons_shrink-D_icons_grow" 
+		width="2" height="height-2*(height-height%3)/3-6-D_icons_shrink+D_icons_grow" filled="true"
+		color="C_icons_unfocused_pressed" />
+</draw_ops>
+
+<draw_ops name="shade_unfocused_pressed">
+	<include name="shade_glyph_unfocused_pressed" y="D_icons_unfocused_offset" />
+</draw_ops>
+
+
 	<!-- button backgrounds -->
 
 <constant name="C_button_border" value="blend/#000000/gtk:bg[NORMAL]/0.8" />
-<constant name="C_button_hilight" value="blend/#ffffff/gtk:bg[NORMAL]/0.6" />
+<constant name="C_button_hilight" value="blend/gtk:base[NORMAL]/gtk:bg[NORMAL]/0.6" />
 
 <draw_ops name="button_fill"> <!-- button background gradient -->
 	<gradient type="vertical" x="0" y="0" width="width" height="height-2">
@@ -622,7 +771,7 @@
 
 <draw_ops name="button_bevel">
 	<gradient type="vertical" x="0" y="0" width="1" height="height-2">
-		<color value="blend/gtk:bg[NORMAL]/#ffffff/0.1"/>
+		<color value="blend/gtk:bg[NORMAL]/gtk:base[NORMAL]/0.1"/>
 		<color value="blend/gtk:bg[NORMAL]/#000000/0.1"/>
 	</gradient>
 	<gradient type="vertical" x="width-1" y="0" width="1" height="height-2">
@@ -885,6 +1034,10 @@
 	<button function="minimize" state="pressed" draw_ops="minimize_focused_pressed" />
 	<button function="menu" state="normal" draw_ops="menu_focused" />
 	<button function="menu" state="pressed" draw_ops="menu_focused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_focused" />
+	<button function="shade" state="pressed" draw_ops="shade_focused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_focused" />
+	<button function="unshade" state="pressed" draw_ops="shade_focused_pressed" />
 
 	<button function="left_middle_background" state="normal" draw_ops="button"/>
 	<button function="left_middle_background" state="prelight" draw_ops="button_prelight"/>
@@ -900,10 +1053,6 @@
 	<button function="right_left_background" state="prelight" draw_ops="button_inner_right_prelight"/>
 	<button function="right_left_background" state="pressed" draw_ops="button_inner_right_pressed"/>
 
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -931,10 +1080,12 @@
 	<button function="menu" state="normal" draw_ops="menu_unfocused" />
 	<button function="menu" state="prelight" draw_ops="menu_unfocused_prelight" />
 	<button function="menu" state="pressed" draw_ops="menu_unfocused_pressed" />
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
+	<button function="shade" state="normal" draw_ops="shade_unfocused" />
+	<button function="shade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="shade" state="pressed" draw_ops="shade_unfocused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_unfocused" />
+	<button function="unshade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="unshade" state="pressed" draw_ops="shade_unfocused_pressed" />
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -947,7 +1098,7 @@
 
 <frame_style name="normal_max_focused" geometry="max">
 	<piece position="entire_background" draw_ops="entire_background_focused" />
-	<piece position="titlebar" draw_ops="titlebar_fill_focused" />
+	<piece position="titlebar" draw_ops="titlebar_fill_focused_alt" />
 	<piece position="title" draw_ops="title_focused" />
 	<button function="close" state="normal" draw_ops="close_focused" />
 	<button function="close" state="pressed" draw_ops="close_focused_pressed" />
@@ -957,6 +1108,10 @@
 	<button function="minimize" state="pressed" draw_ops="minimize_focused_pressed" />
 	<button function="menu" state="normal" draw_ops="menu_focused" />
 	<button function="menu" state="pressed" draw_ops="menu_focused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_focused" />
+	<button function="shade" state="pressed" draw_ops="shade_focused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_focused" />
+	<button function="unshade" state="pressed" draw_ops="shade_focused_pressed" />
 
 	<button function="left_middle_background" state="normal" draw_ops="button"/>
 	<button function="left_middle_background" state="prelight" draw_ops="button_prelight"/>
@@ -972,10 +1127,6 @@
 	<button function="right_left_background" state="prelight" draw_ops="button_inner_right_prelight"/>
 	<button function="right_left_background" state="pressed" draw_ops="button_inner_right_pressed"/>
 
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1002,10 +1153,87 @@
 	<button function="menu" state="normal" draw_ops="menu_unfocused" />
 	<button function="menu" state="prelight" draw_ops="menu_unfocused_prelight" />
 	<button function="menu" state="pressed" draw_ops="menu_unfocused_pressed" />
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
+	<button function="shade" state="normal" draw_ops="shade_unfocused" />
+	<button function="shade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="shade" state="pressed" draw_ops="shade_unfocused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_unfocused" />
+	<button function="unshade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="unshade" state="pressed" draw_ops="shade_unfocused_pressed" />
+	<button function="above" state="normal"><draw_ops></draw_ops></button>
+	<button function="above" state="pressed"><draw_ops></draw_ops></button>
+	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
+	<button function="unabove" state="pressed"><draw_ops></draw_ops></button>
+	<button function="stick" state="normal"><draw_ops></draw_ops></button>
+	<button function="stick" state="pressed"><draw_ops></draw_ops></button>
+	<button function="unstick" state="normal"><draw_ops></draw_ops></button>
+	<button function="unstick" state="pressed"><draw_ops></draw_ops></button>
+</frame_style>
+
+<frame_style name="normal_max_shaded_focused" geometry="max">
+	<piece position="entire_background" draw_ops="entire_background_focused" />
+	<piece position="titlebar" draw_ops="titlebar_fill_focused_alt" />
+	<piece position="title" draw_ops="title_focused" />
+	<piece position="overlay"><draw_ops><line x1="0" y1="height-1" x2="width" y2="height-1" color="C_border_focused" /></draw_ops></piece>
+	<button function="close" state="normal" draw_ops="close_focused" />
+	<button function="close" state="pressed" draw_ops="close_focused_pressed" />
+	<button function="maximize" state="normal" draw_ops="maximize_focused" />
+	<button function="maximize" state="pressed" draw_ops="maximize_focused_pressed" />
+	<button function="minimize" state="normal" draw_ops="minimize_focused" />
+	<button function="minimize" state="pressed" draw_ops="minimize_focused_pressed" />
+	<button function="menu" state="normal" draw_ops="menu_focused" />
+	<button function="menu" state="pressed" draw_ops="menu_focused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_focused" />
+	<button function="shade" state="pressed" draw_ops="shade_focused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_focused" />
+	<button function="unshade" state="pressed" draw_ops="shade_focused_pressed" />
+
+	<button function="left_middle_background" state="normal" draw_ops="button"/>
+	<button function="left_middle_background" state="prelight" draw_ops="button_prelight"/>
+	<button function="left_middle_background" state="pressed" draw_ops="button_pressed"/>
+	<button function="left_right_background" state="normal" draw_ops="button_inner_left"/>
+	<button function="left_right_background" state="prelight" draw_ops="button_inner_left_prelight"/>
+	<button function="left_right_background" state="pressed" draw_ops="button_inner_left_pressed"/>
+
+	<button function="right_middle_background" state="normal" draw_ops="button"/>
+	<button function="right_middle_background" state="prelight" draw_ops="button_prelight"/>
+	<button function="right_middle_background" state="pressed" draw_ops="button_pressed"/>
+	<button function="right_left_background" state="normal" draw_ops="button_inner_right"/>
+	<button function="right_left_background" state="prelight" draw_ops="button_inner_right_prelight"/>
+	<button function="right_left_background" state="pressed" draw_ops="button_inner_right_pressed"/>
+
+	<button function="above" state="normal"><draw_ops></draw_ops></button>
+	<button function="above" state="pressed"><draw_ops></draw_ops></button>
+	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
+	<button function="unabove" state="pressed"><draw_ops></draw_ops></button>
+	<button function="stick" state="normal"><draw_ops></draw_ops></button>
+	<button function="stick" state="pressed"><draw_ops></draw_ops></button>
+	<button function="unstick" state="normal"><draw_ops></draw_ops></button>
+	<button function="unstick" state="pressed"><draw_ops></draw_ops></button>
+</frame_style>
+
+<frame_style name="normal_max_shaded_unfocused" geometry="max">
+	<piece position="entire_background" draw_ops="entire_background_unfocused" />
+	<piece position="titlebar" draw_ops="titlebar_fill_unfocused" />
+	<piece position="title" draw_ops="title_unfocused" />
+	<piece position="overlay"><draw_ops><line x1="0" y1="height-1" x2="width" y2="height-1" color="C_border_unfocused" /></draw_ops></piece>
+	<button function="close" state="normal" draw_ops="close_unfocused"/>
+	<button function="close" state="prelight" draw_ops="close_unfocused_prelight"/>
+	<button function="close" state="pressed" draw_ops="close_unfocused_pressed"/>
+	<button function="maximize" state="normal" draw_ops="maximize_unfocused"/>
+	<button function="maximize" state="prelight" draw_ops="maximize_unfocused_prelight"/>
+	<button function="maximize" state="pressed" draw_ops="maximize_unfocused_pressed"/>
+	<button function="minimize" state="normal" draw_ops="minimize_unfocused"/>
+	<button function="minimize" state="prelight" draw_ops="minimize_unfocused_prelight"/>
+	<button function="minimize" state="pressed" draw_ops="minimize_unfocused_pressed"/>
+	<button function="menu" state="normal" draw_ops="menu_unfocused" />
+	<button function="menu" state="prelight" draw_ops="menu_unfocused_prelight" />
+	<button function="menu" state="pressed" draw_ops="menu_unfocused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_unfocused" />
+	<button function="shade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="shade" state="pressed" draw_ops="shade_unfocused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_unfocused" />
+	<button function="unshade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="unshade" state="pressed" draw_ops="shade_unfocused_pressed" />
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1018,7 +1246,7 @@
 
 <frame_style name="dialog_focused" geometry="nobuttons">
 	<piece position="entire_background" draw_ops="entire_background_focused" />
-	<piece position="titlebar" draw_ops="rounded_titlebar_focused_alt" />
+	<piece position="titlebar" draw_ops="rounded_titlebar_focused" />
 	<piece position="title" draw_ops="title_focused" />
 	<piece position="overlay" draw_ops="rounded_border_focused" />
 	<button function="close" state="normal" draw_ops="close_focused" />
@@ -1029,6 +1257,10 @@
 	<button function="minimize" state="pressed" draw_ops="minimize_focused_pressed" />
 	<button function="menu" state="normal" draw_ops="menu_focused" />
 	<button function="menu" state="pressed" draw_ops="menu_focused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_focused" />
+	<button function="shade" state="pressed" draw_ops="shade_focused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_focused" />
+	<button function="unshade" state="pressed" draw_ops="shade_focused_pressed" />
 
 	<button function="left_middle_background" state="normal" draw_ops="button"/>
 	<button function="left_middle_background" state="prelight" draw_ops="button_prelight"/>
@@ -1044,10 +1276,6 @@
 	<button function="right_left_background" state="prelight" draw_ops="button_inner_right_prelight"/>
 	<button function="right_left_background" state="pressed" draw_ops="button_inner_right_pressed"/>
 
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1091,9 +1319,9 @@
 
 <frame_style name="modal_dialog_focused" geometry="modal">
 	<piece position="entire_background" draw_ops="entire_background_focused" />
-	<piece position="titlebar" draw_ops="titlebar_focused_alt" />
+	<piece position="titlebar" draw_ops="rounded_titlebar_focused" />
 	<piece position="title" draw_ops="title_focused" />
-	<piece position="overlay" draw_ops="border_focused" />
+	<piece position="overlay" draw_ops="rounded_border_focused" />
 	<button function="close" state="normal" draw_ops="close_focused" />
 	<button function="close" state="pressed" draw_ops="close_focused_pressed" />
 	<button function="maximize" state="normal" draw_ops="maximize_focused" />
@@ -1102,6 +1330,10 @@
 	<button function="minimize" state="pressed" draw_ops="minimize_focused_pressed" />
 	<button function="menu" state="normal" draw_ops="menu_focused" />
 	<button function="menu" state="pressed" draw_ops="menu_focused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_focused" />
+	<button function="shade" state="pressed" draw_ops="shade_focused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_focused" />
+	<button function="unshade" state="pressed" draw_ops="shade_focused_pressed" />
 
 	<button function="left_middle_background" state="normal" draw_ops="button"/>
 	<button function="left_middle_background" state="prelight" draw_ops="button_prelight"/>
@@ -1117,10 +1349,6 @@
 	<button function="right_left_background" state="prelight" draw_ops="button_inner_right_prelight"/>
 	<button function="right_left_background" state="pressed" draw_ops="button_inner_right_pressed"/>
 
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1134,7 +1362,7 @@
 	<piece position="entire_background" draw_ops="entire_background_unfocused" />
 	<piece position="titlebar" draw_ops="titlebar_unfocused" />
 	<piece position="title" draw_ops="title_unfocused" />
-	<piece position="overlay" draw_ops="border_unfocused" />
+	<piece position="overlay" draw_ops="rounded_border_unfocused" />
 	<button function="close" state="normal" draw_ops="close_unfocused"/>
 	<button function="close" state="prelight" draw_ops="close_unfocused_prelight"/>
 	<button function="close" state="pressed" draw_ops="close_unfocused_pressed"/>
@@ -1147,10 +1375,12 @@
 	<button function="menu" state="normal" draw_ops="menu_unfocused" />
 	<button function="menu" state="prelight" draw_ops="menu_unfocused_prelight" />
 	<button function="menu" state="pressed" draw_ops="menu_unfocused_pressed" />
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
+	<button function="shade" state="normal" draw_ops="shade_unfocused" />
+	<button function="shade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="shade" state="pressed" draw_ops="shade_unfocused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_unfocused" />
+	<button function="unshade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="unshade" state="pressed" draw_ops="shade_unfocused_pressed" />
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1163,7 +1393,7 @@
 
 <frame_style name="utility_focused" geometry="small">
 	<piece position="entire_background" draw_ops="entire_background_focused" />
-	<piece position="titlebar" draw_ops="titlebar_focused" />
+	<piece position="titlebar" draw_ops="titlebar_focused_alt" />
 	<piece position="title" draw_ops="title_focused" />
 	<piece position="overlay" draw_ops="border_focused" />
 	<button function="close" state="normal" draw_ops="close_focused" />
@@ -1174,6 +1404,10 @@
 	<button function="minimize" state="pressed" draw_ops="minimize_focused_pressed" />
 	<button function="menu" state="normal" draw_ops="menu_focused" />
 	<button function="menu" state="pressed" draw_ops="menu_focused_pressed" />
+	<button function="shade" state="normal" draw_ops="shade_focused" />
+	<button function="shade" state="pressed" draw_ops="shade_focused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_focused" />
+	<button function="unshade" state="pressed" draw_ops="shade_focused_pressed" />
 
 	<button function="left_middle_background" state="normal" draw_ops="button_inner_left"/>
 	<button function="left_middle_background" state="prelight" draw_ops="button_inner_left_prelight"/>
@@ -1183,10 +1417,6 @@
 	<button function="right_middle_background" state="prelight" draw_ops="button_inner_right_prelight"/>
 	<button function="right_middle_background" state="pressed" draw_ops="button_inner_right_pressed"/>
 
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1214,10 +1444,12 @@
 	<button function="menu" state="normal" draw_ops="menu_unfocused" />
 	<button function="menu" state="prelight" draw_ops="menu_unfocused_prelight" />
 	<button function="menu" state="pressed" draw_ops="menu_unfocused_pressed" />
-	<button function="shade" state="normal"><draw_ops></draw_ops></button>
-	<button function="shade" state="pressed"><draw_ops></draw_ops></button>
-	<button function="unshade" state="normal"><draw_ops></draw_ops></button>
-	<button function="unshade" state="pressed"><draw_ops></draw_ops></button>
+	<button function="shade" state="normal" draw_ops="shade_unfocused" />
+	<button function="shade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="shade" state="pressed" draw_ops="shade_unfocused_pressed" />
+	<button function="unshade" state="normal" draw_ops="shade_unfocused" />
+	<button function="unshade" state="prelight" draw_ops="shade_unfocused_prelight" />
+	<button function="unshade" state="pressed" draw_ops="shade_unfocused_pressed" />
 	<button function="above" state="normal"><draw_ops></draw_ops></button>
 	<button function="above" state="pressed"><draw_ops></draw_ops></button>
 	<button function="unabove" state="normal"><draw_ops></draw_ops></button>
@@ -1309,19 +1541,19 @@
 	<frame focus="no" state="normal" resize="both" style="normal_unfocused"/>
 	<frame focus="yes" state="maximized" style="normal_max_focused"/>
 	<frame focus="no" state="maximized" style="normal_max_unfocused"/>
-	<frame focus="yes" state="shaded" style="blank"/>
-	<frame focus="no" state="shaded" style="blank"/>
-	<frame focus="yes" state="maximized_and_shaded" style="blank"/>
-	<frame focus="no" state="maximized_and_shaded" style="blank"/>
+	<frame focus="yes" state="shaded" style="normal_focused"/>
+	<frame focus="no" state="shaded" style="normal_unfocused"/>
+	<frame focus="yes" state="maximized_and_shaded" style="normal_max_shaded_focused"/>
+	<frame focus="no" state="maximized_and_shaded" style="normal_max_shaded_unfocused"/>
 </frame_style_set>
 
 <frame_style_set name="dialog_style_set">
 	<frame focus="yes" state="normal" resize="both" style="dialog_focused"/>
 	<frame focus="no" state="normal" resize="both" style="dialog_unfocused"/>
-	<frame focus="yes" state="maximized" style="normal_max_focused"/>
-	<frame focus="no" state="maximized" style="normal_max_unfocused"/>
-	<frame focus="yes" state="shaded" style="blank"/>
-	<frame focus="no" state="shaded" style="blank"/>
+	<frame focus="yes" state="maximized" style="blank"/>
+	<frame focus="no" state="maximized" style="blank"/>
+	<frame focus="yes" state="shaded" style="dialog_focused"/>
+	<frame focus="no" state="shaded" style="dialog_unfocused"/>
 	<frame focus="yes" state="maximized_and_shaded" style="blank"/>
 	<frame focus="no" state="maximized_and_shaded" style="blank"/>
 </frame_style_set>
@@ -1329,10 +1561,10 @@
 <frame_style_set name="modal_dialog_style_set">
 	<frame focus="yes" state="normal" resize="both" style="modal_dialog_focused"/>
 	<frame focus="no" state="normal" resize="both" style="modal_dialog_unfocused"/>
-	<frame focus="yes" state="maximized" style="normal_max_focused"/>
-	<frame focus="no" state="maximized" style="normal_max_unfocused"/>
-	<frame focus="yes" state="shaded" style="blank"/>
-	<frame focus="no" state="shaded" style="blank"/>
+	<frame focus="yes" state="maximized" style="blank"/>
+	<frame focus="no" state="maximized" style="blank"/>
+	<frame focus="yes" state="shaded" style="modal_dialog_focused"/>
+	<frame focus="no" state="shaded" style="modal_dialog_unfocused"/>
 	<frame focus="yes" state="maximized_and_shaded" style="blank"/>
 	<frame focus="no" state="maximized_and_shaded" style="blank"/>
 </frame_style_set>
@@ -1340,10 +1572,10 @@
 <frame_style_set name="utility_style_set">
 	<frame focus="yes" state="normal" resize="both" style="utility_focused"/>
 	<frame focus="no" state="normal" resize="both" style="utility_unfocused"/>
-	<frame focus="yes" state="maximized" style="normal_max_focused"/>
-	<frame focus="no" state="maximized" style="normal_max_unfocused"/>
-	<frame focus="yes" state="shaded" style="blank"/>
-	<frame focus="no" state="shaded" style="blank"/>
+	<frame focus="yes" state="maximized" style="blank"/>
+	<frame focus="no" state="maximized" style="blank"/>
+	<frame focus="yes" state="shaded" style="utility_focused"/>
+	<frame focus="no" state="shaded" style="utility_unfocused"/>
 	<frame focus="yes" state="maximized_and_shaded" style="blank"/>
 	<frame focus="no" state="maximized_and_shaded" style="blank"/>
 </frame_style_set>
@@ -1351,14 +1583,15 @@
 <frame_style_set name="border_style_set">
 	<frame focus="yes" state="normal" resize="both" style="border_focused"/>
 	<frame focus="no" state="normal" resize="both" style="border_unfocused"/>
-	<frame focus="yes" state="maximized" style="normal_max_focused"/>
-	<frame focus="no" state="maximized" style="normal_max_unfocused"/>
+	<frame focus="yes" state="maximized" style="blank"/>
+	<frame focus="no" state="maximized" style="blank"/>
 	<frame focus="yes" state="shaded" style="blank"/>
 	<frame focus="no" state="shaded" style="blank"/>
 	<frame focus="yes" state="maximized_and_shaded" style="blank"/>
 	<frame focus="no" state="maximized_and_shaded" style="blank"/>
 </frame_style_set>
 
+
 <!-- windows -->
 
 <window type="normal" style_set="normal_style_set"/>
diff --git a/themes/Adwaita/metacity-1/metacity-theme-3.xml b/themes/Adwaita/metacity-1/metacity-theme-3.xml
index 34a26ba..69e3542 100644
--- a/themes/Adwaita/metacity-1/metacity-theme-3.xml
+++ b/themes/Adwaita/metacity-1/metacity-theme-3.xml
@@ -51,8 +51,11 @@
 	<distance name="right_width" value="0" />
 	<distance name="left_titlebar_edge" value="0"/>
 	<distance name="right_titlebar_edge" value="0"/>
-	<distance name="title_vertical_pad" value="10"/>
-	<border name="title_border" left="10" right="10" top="0" bottom="2"/>
+	<distance name="title_vertical_pad" value="9"/> <!-- 
+							This needs to be 1 less then the
+							title_vertical_pad on normal state
+							or you'll have bigger buttons 								-->
+	<border name="title_border" left="10" right="10" top="1" bottom="2"/>
 	<border name="button_border" left="0" right="0" top="0" bottom="2"/>
 	<distance name="bottom_height" value="0" />
 </frame_geometry>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]