[mutter/wip/fmuellner/gtk-shadows: 3/8] theme: Consider frame borders in titlebar



commit 482a5816f3d86e772b1648229eddd79e90a4830b
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 27 17:16:47 2016 +0200

    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

 src/ui/theme.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 2f527fb..7421fb9 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]