summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-08-04 20:45:05 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-08-04 20:45:05 +0000
commitf3446fad9a03ce1e653f58fb2eef95b7fd6ec7f7 (patch)
treea4c07b60ad9b75202e35c0cb1beff03ca8170e21 /src
parentd81fdce4828f336dacd24bf4c93885b8dff3c871 (diff)
downloadmetacity-f3446fad9a03ce1e653f58fb2eef95b7fd6ec7f7.tar.gz
metacity-f3446fad9a03ce1e653f58fb2eef95b7fd6ec7f7.tar.bz2
init button states for the button backgrounds
2002-08-04 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_paint_to_drawable): init button states for the button backgrounds * src/themes/Atlanta/metacity-theme-1.xml: adapt to work correctly with button repositioning
Diffstat (limited to 'src')
-rw-r--r--src/frames.c14
-rw-r--r--src/themes/Atlanta/metacity-theme-1.xml12
2 files changed, 21 insertions, 5 deletions
diff --git a/src/frames.c b/src/frames.c
index 18ca609..f3f43d7 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -1573,6 +1573,20 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
break;
}
}
+
+ /* Map button function states to button position states */
+ button_states[META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND] =
+ button_states[META_BUTTON_TYPE_MENU];
+ button_states[META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND] =
+ META_BUTTON_STATE_NORMAL;
+ button_states[META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND] =
+ META_BUTTON_STATE_NORMAL;
+ button_states[META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND] =
+ button_states[META_BUTTON_TYPE_MINIMIZE];
+ button_states[META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND] =
+ button_states[META_BUTTON_TYPE_MAXIMIZE];
+ button_states[META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND] =
+ button_states[META_BUTTON_TYPE_CLOSE];
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
diff --git a/src/themes/Atlanta/metacity-theme-1.xml b/src/themes/Atlanta/metacity-theme-1.xml
index 8d9fa50..2dc29ae 100644
--- a/src/themes/Atlanta/metacity-theme-1.xml
+++ b/src/themes/Atlanta/metacity-theme-1.xml
@@ -80,7 +80,6 @@
</draw_ops>
<draw_ops name="menu_button_pressed">
- <include name="button_pressed_bg"/>
<include name="menu_button"/>
</draw_ops>
@@ -94,7 +93,6 @@
</draw_ops>
<draw_ops name="minimize_button_pressed">
- <include name="button_pressed_bg"/>
<include name="minimize_button"/>
</draw_ops>
@@ -106,7 +104,6 @@
</draw_ops>
<draw_ops name="maximize_button_pressed">
- <include name="button_pressed_bg"/>
<include name="maximize_button"/>
</draw_ops>
@@ -131,7 +128,6 @@
</draw_ops>
<draw_ops name="restore_button_pressed">
- <include name="button_pressed_bg"/>
<include name="restore_button"/>
</draw_ops>
@@ -145,7 +141,6 @@
</draw_ops>
<draw_ops name="close_button_pressed">
- <include name="button_pressed_bg"/>
<include name="close_button"/>
</draw_ops>
@@ -252,6 +247,13 @@
<piece position="title" draw_ops="title_normal"/>
<!-- we don't specify for prelight, so normal is used -->
+ <button function="left_left_background" state="pressed" draw_ops="button_pressed_bg"/>
+ <button function="left_middle_background" state="pressed" draw_ops="button_pressed_bg"/>
+ <button function="left_right_background" state="pressed" draw_ops="button_pressed_bg"/>
+ <button function="right_left_background" state="pressed" draw_ops="button_pressed_bg"/>
+ <button function="right_middle_background" state="pressed" draw_ops="button_pressed_bg"/>
+ <button function="right_right_background" state="pressed" draw_ops="button_pressed_bg"/>
+
<button function="close" state="normal" draw_ops="close_button"/>
<button function="close" state="pressed" draw_ops="close_button_pressed"/>
<button function="minimize" state="normal" draw_ops="minimize_button"/>