summaryrefslogtreecommitdiff
path: root/src/themes
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-09 06:54:44 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-09 06:54:44 +0000
commit116fc5546f3ab87a6a2650aa7afa4aa5c842a9bd (patch)
tree3ddd3567dbce8ed6b996d9f85608bb934ef7154e /src/themes
parent844a8ac13f057f235cf3044f23b23cabf10e65f7 (diff)
downloadmetacity-116fc5546f3ab87a6a2650aa7afa4aa5c842a9bd.tar.gz
metacity-116fc5546f3ab87a6a2650aa7afa4aa5c842a9bd.tar.bz2
put in some kind of distinctive frame for UTILITY, though it's ugly. Also
2002-02-09 Havoc Pennington <hp@pobox.com> * src/themes/Atlanta/metacity-theme-1.xml: put in some kind of distinctive frame for UTILITY, though it's ugly. Also put in the borderless look for maximized windows. * src/stack.c (compute_layer): put splash screen in the splash layer * src/stack.h (enum): create a splash screen layer * src/place.c (meta_window_place): center splashscreen, and fix a typo in the centering code * src/window.c (recalc_window_features): disable most features on splash screens * src/screen.c (set_supported_hint): add UTILITY and SPLASHSCREEN hints * src/window.c: add UTILITY, SPLASHSCREEN implementation * src/window.h (enum): add UTILITY, SPLASHSCREEN types * src/theme-parser.c (parse_toplevel_element): parser support for has_title attribute * src/theme.c (meta_frame_layout_get_borders): handle a has_title field in the layout, for utility windows that don't display a title (would be better to be able to shrink the title text, but that's kind of tricky to implement :-/)
Diffstat (limited to 'src/themes')
-rw-r--r--src/themes/Atlanta/metacity-theme-1.xml76
1 files changed, 66 insertions, 10 deletions
diff --git a/src/themes/Atlanta/metacity-theme-1.xml b/src/themes/Atlanta/metacity-theme-1.xml
index dd76732..8913a6f 100644
--- a/src/themes/Atlanta/metacity-theme-1.xml
+++ b/src/themes/Atlanta/metacity-theme-1.xml
@@ -23,11 +23,24 @@
<!-- strip borders off the normal geometry -->
<frame_geometry name="normal_borderless" parent="normal">
- <distance name="left_width" value="0"/>
- <distance name="right_width" value="0"/>
- <distance name="bottom_height" value="0"/>
- <distance name="left_titlebar_edge" value="0"/>
- <distance name="right_titlebar_edge" value="0"/>
+ <distance name="left_width" value="4"/>
+ <distance name="right_width" value="4"/>
+ <distance name="bottom_height" value="5"/>
+ <distance name="left_titlebar_edge" value="4"/>
+ <distance name="right_titlebar_edge" value="4"/>
+</frame_geometry>
+
+<frame_geometry name="utility" has_title="false">
+ <distance name="left_width" value="3"/>
+ <distance name="right_width" value="3"/>
+ <distance name="bottom_height" value="4"/>
+ <distance name="left_titlebar_edge" value="3"/>
+ <distance name="right_titlebar_edge" value="3"/>
+ <distance name="button_width" value="11"/>
+ <distance name="button_height" value="11"/>
+ <distance name="title_vertical_pad" value="11"/>
+ <border name="title_border" left="3" right="4" top="3" bottom="3"/>
+ <border name="button_border" left="0" right="0" top="1" bottom="1"/>
</frame_geometry>
<!-- define constants -->
@@ -136,19 +149,30 @@
x1="1" y1="height-2" x2="width-2" y2="height-2"/>
</draw_ops>
-<draw_ops name="focus_background">
- <include name="outer_bevel"/>
+<draw_ops name="blank">
+<!-- nothing -->
+</draw_ops>
+
+<draw_ops name="focus_outline">
<rectangle color="#000000"
x="left_width-1" y="top_height-1"
width="width-left_width-right_width+1"
height="height-top_height-bottom_height+1"/>
</draw_ops>
+<draw_ops name="focus_background">
+ <include name="outer_bevel"/>
+ <include name="focus_outline"/>
+</draw_ops>
+
<draw_ops name="title_gradient">
<gradient type="diagonal" x="0" y="0" width="width-SpacerWidth" height="height">
<color value="blend/gtk:bg[NORMAL]/gtk:bg[SELECTED]/0.6"/>
<color value="gtk:bg[SELECTED]"/>
</gradient>
+</draw_ops>
+
+<draw_ops name="title_spacer">
<gtk_vline state="normal" x="width+1-SpacerWidth/2"
y1="(height-SpacerHeight)/2"
y2="height - (height-SpacerHeight)/2"/>
@@ -175,14 +199,25 @@
</draw_ops>
<draw_ops name="title_normal">
+ <include name="title_spacer"/>
<include name="title_text"/>
</draw_ops>
<draw_ops name="title_focused">
<include name="title_gradient"/>
+ <include name="title_spacer"/>
<include name="title_text_focused"/>
</draw_ops>
+<draw_ops name="title_utility">
+ <include name="title_spacer"/>
+</draw_ops>
+
+<draw_ops name="title_utility_focused">
+ <include name="title_gradient"/>
+ <include name="title_spacer"/>
+</draw_ops>
+
<frame_style name="normal_unfocused" geometry="normal">
<piece position="entire_background" draw_ops="outer_bevel"/>
<piece position="title" draw_ops="title_normal"/>
@@ -203,16 +238,25 @@
<piece position="title" draw_ops="title_focused"/>
</frame_style>
-<frame_style name="maximized_unfocused" parent="normal_unfocused">
+<frame_style name="maximized_unfocused" geometry="normal_borderless" parent="normal_unfocused">
+ <piece position="entire_background" draw_ops="blank"/>
<button function="maximize" state="normal" draw_ops="restore_button"/>
<button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
</frame_style>
-<frame_style name="maximized_focused" parent="normal_focused">
+<frame_style name="maximized_focused" geometry="normal_borderless" parent="normal_focused">
+ <piece position="entire_background" draw_ops="focus_outline"/>
<button function="maximize" state="normal" draw_ops="restore_button"/>
<button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
</frame_style>
+<frame_style name="utility_unfocused" geometry="utility" parent="normal_unfocused">
+ <piece position="title" draw_ops="title_utility"/>
+</frame_style>
+
+<frame_style name="utility_focused" geometry="utility" parent="normal_focused">
+ <piece position="title" draw_ops="title_utility_focused"/>
+</frame_style>
<frame_style_set name="normal">
<frame focus="yes" state="normal" resize="both" style="normal_focused"/>
@@ -225,11 +269,23 @@
<frame focus="no" state="maximized_and_shaded" style="maximized_unfocused"/>
</frame_style_set>
+<frame_style_set name="utility" parent="normal">
+<frame focus="yes" state="normal" resize="both" style="utility_focused"/>
+<frame focus="no" state="normal" resize="both" style="utility_unfocused"/>
+<!-- this is a bunch of crack since utility windows shouldn't be maximized -->
+<frame focus="yes" state="maximized" style="utility_focused"/>
+<frame focus="no" state="maximized" style="utility_unfocused"/>
+<frame focus="yes" state="shaded" style="utility_focused"/>
+<frame focus="no" state="shaded" style="utility_unfocused"/>
+<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
+<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
+</frame_style_set>
+
<window type="normal" style_set="normal"/>
<window type="dialog" style_set="normal"/>
<window type="modal_dialog" style_set="normal"/>
<window type="menu" style_set="normal"/>
-<window type="utility" style_set="normal"/>
+<window type="utility" style_set="utility"/>
<menu_icon function="close" state="normal" draw_ops="close_button"/>
<menu_icon function="maximize" state="normal" draw_ops="maximize_button"/>