[gtk] treeview: Don't get separator_height more than once
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] treeview: Don't get separator_height more than once
- Date: Wed, 16 Jan 2019 18:24:04 +0000 (UTC)
commit 7dd54b5789aae821c3af5b5eb9536503832d9e04
Author: Timm Bäder <mail baedert org>
Date: Tue Jan 15 16:26:13 2019 +0100
treeview: Don't get separator_height more than once
Closes !209
gtk/gtktreeview.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index dc31077220..01f30f5450 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5545,6 +5545,7 @@ validate_row (GtkTreeView *tree_view,
gboolean is_separator = FALSE;
gboolean draw_vgrid_lines, draw_hgrid_lines;
gint expander_size;
+ int separator_height;
/* double check the row needs validating */
if (! GTK_TREE_RBNODE_FLAG_SET (node, GTK_TREE_RBNODE_INVALID) &&
@@ -5573,6 +5574,8 @@ validate_row (GtkTreeView *tree_view,
first_column = first_column->next)
;
+ separator_height = get_separator_height (tree_view);
+
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_CELL);
@@ -5604,7 +5607,7 @@ validate_row (GtkTreeView *tree_view,
if (is_separator)
{
- height = get_separator_height (tree_view);
+ height = separator_height;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]