theme: Consider frame borders in titlebar

We currently use the entire top border area to paint the titlebar,
ignoring the frame border set by the theme. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=744667
This commit is contained in:
Florian Müllner 2016-10-27 17:16:47 +02:00
parent 9149f56b51
commit 482a5816f3

View File

@ -766,10 +766,10 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
visible_rect.x, visible_rect.y,
visible_rect.width, visible_rect.height);
titlebar_rect.x = visible_rect.x;
titlebar_rect.y = visible_rect.y;
titlebar_rect.width = visible_rect.width;
titlebar_rect.height = borders->visible.top / scale;
titlebar_rect.x = borders->total.left / scale;
titlebar_rect.y = visible_rect.y + layout->frame_border.top;
titlebar_rect.width = (fgeom->width - borders->total.left - borders->total.right) / scale;
titlebar_rect.height = borders->visible.top / scale - layout->frame_border.top;
style = style_info->styles[META_STYLE_ELEMENT_TITLEBAR];
gtk_render_background (style, cr,