From c3a5c4c169811b4c052c5326656306ef0203565a Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 24 Oct 2002 20:47:19 +0000 Subject: [PATCH] if only one right-corner button, use right_right_background not 2002-10-24 Havoc Pennington * src/theme.c (meta_frame_layout_calc_geometry): if only one right-corner button, use right_right_background not right_left_background --- ChangeLog | 6 ++++++ src/theme.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f003080b7..49e34a3e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-10-24 Havoc Pennington + + * src/theme.c (meta_frame_layout_calc_geometry): if only one + right-corner button, use right_right_background not + right_left_background + 2002-10-24 Havoc Pennington * src/window.c (meta_window_get_icon_geometry): make public diff --git a/src/theme.c b/src/theme.c index c94d3a8f3..7edd181e8 100644 --- a/src/theme.c +++ b/src/theme.c @@ -575,10 +575,10 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, i = 0; while (i < n_left) { - if (i == 0) - left_bg_rects[i] = &fgeom->left_left_background; - else if (i == (n_left - 1)) + if (i == 0) /* prefer left background if only one button */ left_bg_rects[i] = &fgeom->left_right_background; + else if (i == (n_left - 1)) + left_bg_rects[i] = &fgeom->left_left_background; else left_bg_rects[i] = &fgeom->left_middle_backgrounds[i-1]; @@ -588,9 +588,9 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, i = 0; while (i < n_right) { - if (i == 0) + if (i == (n_right - 1)) /* prefer right background if only one button */ right_bg_rects[i] = &fgeom->right_left_background; - else if (i == (n_right - 1)) + else if (i == 0) right_bg_rects[i] = &fgeom->right_right_background; else right_bg_rects[i] = &fgeom->right_middle_backgrounds[i-1];