talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 3bac5c33c1206a2e1cc5c2460ca66a7c879e56c2
parent c4d74d0e8f779d27871bc98bf34004c1ad7b199c
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sun, 11 Feb 2018 12:54:33 +0100

Do not draw scrollbar over the column headers in GtkCMCList.

Diffstat:
Msrc/gtk/gtkcmclist.c | 20+++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c @@ -74,6 +74,8 @@ #define COLUMN_LEFT_XPIXEL(clist, colnum) ((clist)->column[(colnum)].area.x + \ (clist)->hoffset) +static void gtk_cmclist_scrollable_init (GtkScrollableInterface *iface); + /* returns the column index from a x pixel location in the * context of the clist's hoffset */ static inline gint @@ -513,7 +515,7 @@ gtk_cmclist_get_type (void) #else G_DEFINE_TYPE_WITH_CODE (GtkCMCList, gtk_cmclist, GTK_TYPE_CONTAINER, G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, - NULL)) + gtk_cmclist_scrollable_init)) #endif static void @@ -7896,3 +7898,19 @@ gtk_cmclist_set_button_actions (GtkCMCList *clist, clist->button_actions[button] = button_actions; } } + +static gboolean +gtk_cmclist_get_border (GtkScrollable *scrollable, + GtkBorder *border) +{ + GtkCMCList *cmclist = GTK_CMCLIST(scrollable); + + border->top = cmclist->column_title_area.height; + return TRUE; +} + +static void +gtk_cmclist_scrollable_init (GtkScrollableInterface *iface) +{ + iface->get_border = gtk_cmclist_get_border; +}