diff options
author | Thomas Thurman <tthurman@gnome.org> | 2009-10-25 01:48:07 -0400 |
---|---|---|
committer | Thomas Thurman <tthurman@gnome.org> | 2009-10-25 01:48:07 -0400 |
commit | 6e1639133aa2cc05d050dd8be467b154530b1f03 (patch) | |
tree | 4a419aa46f0d9729e01480aa963813f08f9c2266 | |
parent | 99ee7b58dde0260e662159e93d647b3cad56ce17 (diff) | |
download | metacity-6e1639133aa2cc05d050dd8be467b154530b1f03.tar.gz |
attempt to make it honour margins correctly
-rw-r--r-- | src/ui/theme.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c index 78fc351d..72e3905e 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -420,16 +420,25 @@ meta_theme_draw_frame_with_style (MetaTheme *theme, { ccss_style_t *style = ccss_stylesheet_query (stylesheet, (ccss_node_t*) &cowbell_nodes[i]); - if (!style || - fgeom.areas[i].width == 0 || - fgeom.areas[i].height == 0) + int x = fgeom.areas[i].x; + int y = fgeom.areas[i].y; + int width = fgeom.areas[i].width; + int height = fgeom.areas[i].height; + + if (!style) continue; - ccss_cairo_style_draw_rectangle (style, cr, - fgeom.areas[i].x, - fgeom.areas[i].y, - fgeom.areas[i].width, - fgeom.areas[i].height); + 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; + height -= (fgeom.areas[i].top_margin + fgeom.areas[i].bottom_margin); + + if (width > 0 && height > 0) + ccss_cairo_style_draw_rectangle (style, cr, + x, y, + width, height); ccss_style_destroy (style); } |