[gtk+/scrollable-indicator] GtkScrolledWindow: Use get_border
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/scrollable-indicator] GtkScrolledWindow: Use get_border
- Date: Wed, 10 Dec 2014 11:53:50 +0000 (UTC)
commit 2f0e83cefdfed9c29fe69491462d2ef5bacba63b
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 10 06:52:49 2014 -0500
GtkScrolledWindow: Use get_border
Instead of poking directly at treeview internals, use the new
scrollable API for getting non-scrollable borders.
gtk/gtkscrolledwindow.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 177af6a..da03a7d 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -43,7 +43,6 @@
#include "gtkwindow.h"
#include "gtkkineticscrolling.h"
#include "a11y/gtkscrolledwindowaccessible.h"
-#include "gtktreeprivate.h"
#include <math.h>
@@ -1768,17 +1767,18 @@ gtk_scrolled_window_inner_allocation (GtkWidget *widget,
GtkAllocation *rect)
{
GtkWidget *child;
- gint header;
+ GtkBorder border = { 0 };
gtk_scrolled_window_relative_allocation (widget, rect);
child = gtk_bin_get_child (GTK_BIN (widget));
- if (GTK_IS_TREE_VIEW (child) &&
- gtk_tree_view_get_headers_visible (GTK_TREE_VIEW (child)))
+ if (GTK_IS_SCROLLABLE (child) &&
+ gtk_scrollable_get_border (GTK_SCROLLABLE (child), &border))
{
- header = _gtk_tree_view_get_header_height (GTK_TREE_VIEW (child));
- rect->y += header;
- rect->height -= header;
+ rect->x += border.left;
+ rect->y += border.top;
+ rect->width -= border.left + border.right;
+ rect->height -= border.top + border.bottom;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]