[gtk/matthiasc/for-master] columnview: Put overshoot underneath the headers
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] columnview: Put overshoot underneath the headers
- Date: Wed, 21 Oct 2020 12:41:53 +0000 (UTC)
commit 81371e7c795e7a530194a900424496f999b9bbe4
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 21 08:39:50 2020 -0400
columnview: Put overshoot underneath the headers
This matches what we do in GtkTreeView.
Fixes: #3285
gtk/gtkcolumnview.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c
index d6c8c58b73..d39b50e875 100644
--- a/gtk/gtkcolumnview.c
+++ b/gtk/gtkcolumnview.c
@@ -247,9 +247,26 @@ gtk_column_view_buildable_interface_init (GtkBuildableIface *iface)
iface->add_child = gtk_column_view_buildable_add_child;
}
+static gboolean
+gtk_column_view_scrollable_get_border (GtkScrollable *scrollable,
+ GtkBorder *border)
+{
+ GtkColumnView *self = GTK_COLUMN_VIEW (scrollable);
+
+ border->top = gtk_widget_get_height (self->header);
+
+ return TRUE;
+}
+
+static void
+gtk_column_view_scrollable_interface_init (GtkScrollableInterface *iface)
+{
+ iface->get_border = gtk_column_view_scrollable_get_border;
+}
+
G_DEFINE_TYPE_WITH_CODE (GtkColumnView, gtk_column_view, GTK_TYPE_WIDGET,
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_column_view_buildable_interface_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE,
gtk_column_view_scrollable_interface_init))
static GParamSpec *properties[N_PROPS] = { NULL, };
static guint signals[LAST_SIGNAL] = { 0 };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]