[metacity/cowbell] include margins in width calculation
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] include margins in width calculation
- Date: Mon, 26 Oct 2009 21:27:57 +0000 (UTC)
commit b04fa1212ce38c3664957e47b121ad923b3d2740
Author: Thomas Thurman <tthurman gnome org>
Date: Mon Oct 26 17:21:11 2009 -0400
include margins in width calculation
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 72e3905..6170688 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
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]