diff options
author | Thomas Thurman <tthurman@gnome.org> | 2009-10-26 17:21:11 -0400 |
---|---|---|
committer | Thomas Thurman <tthurman@gnome.org> | 2009-10-26 17:21:11 -0400 |
commit | b04fa1212ce38c3664957e47b121ad923b3d2740 (patch) | |
tree | 682afbb37525f59aa733825a71c1fe3bb3d28411 | |
parent | 6e1639133aa2cc05d050dd8be467b154530b1f03 (diff) | |
download | metacity-b04fa1212ce38c3664957e47b121ad923b3d2740.tar.gz |
include margins in width calculation
-rw-r--r-- | src/ui/theme.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c index 72e3905e..6170688b 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -428,8 +428,6 @@ meta_theme_draw_frame_with_style (MetaTheme *theme, if (!style) continue; - meta_warning ("%d", fgeom.areas[i].left_margin); - x += fgeom.areas[i].left_margin; width -= (fgeom.areas[i].left_margin + fgeom.areas[i].right_margin); y += fgeom.areas[i].top_margin; @@ -859,6 +857,13 @@ meta_theme_calc_geometry (MetaTheme *theme, fgeom->areas[i].width = cowbell_get_button_width (theme, type, flags, i, button_height); + fgeom->areas[i].width += + fgeom->areas[i].left_margin + + fgeom->areas[i].right_margin; + /* + * but we do not adjust the height; setting top and bottom + * margins on a button just compresses the button + */ fgeom->areas[i].x = -1; /* dummy value, to check * for when we haven't allocated it */ |