summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2005-07-13 11:57:10 +0000
committerKristian Rietveld <kristian@src.gnome.org>2005-07-13 11:57:10 +0000
commit22554a161f2001c006b5254bf835887ebd8cadec (patch)
tree9e8ee1fc1d5f47c478b0d2111f97cd37ef5e747e
parent06e735a652a9aefc787c696b44bfcc666ed61ef2 (diff)
downloadgtk+-22554a161f2001c006b5254bf835887ebd8cadec.tar.gz
when !separator, don't add the focus_line_width to width/height (happens
2005-07-13 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (validate_row): when !separator, don't add the focus_line_width to width/height (happens in _column_cell_get_size), but do add the vertical-separator to height, we weren't taking this into account before. * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): take vertical-separator into account. (#309137, Ross Burton).
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--ChangeLog.pre-2-810
-rw-r--r--gtk/gtkentrycompletion.c7
-rw-r--r--gtk/gtktreeview.c6
5 files changed, 40 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 677891235f..bc5db9595e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-07-13 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeview.c (validate_row): when !separator, don't add
+ the focus_line_width to width/height (happens in
+ _column_cell_get_size), but do add the vertical-separator to height,
+ we weren't taking this into account before.
+
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+ take vertical-separator into account. (#309137, Ross Burton).
+
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* tests/treestoretest.c:
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 677891235f..bc5db9595e 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+2005-07-13 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeview.c (validate_row): when !separator, don't add
+ the focus_line_width to width/height (happens in
+ _column_cell_get_size), but do add the vertical-separator to height,
+ we weren't taking this into account before.
+
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+ take vertical-separator into account. (#309137, Ross Burton).
+
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* tests/treestoretest.c:
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 677891235f..bc5db9595e 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,13 @@
+2005-07-13 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeview.c (validate_row): when !separator, don't add
+ the focus_line_width to width/height (happens in
+ _column_cell_get_size), but do add the vertical-separator to height,
+ we weren't taking this into account before.
+
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+ take vertical-separator into account. (#309137, Ross Burton).
+
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* tests/treestoretest.c:
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 28b8f99511..258356f361 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1321,6 +1321,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
gint matches, items, height, x_border, y_border;
GdkScreen *screen;
gint monitor_num;
+ gint vertical_separator;
GdkRectangle monitor;
GtkRequisition popup_req;
GtkRequisition entry_req;
@@ -1341,6 +1342,12 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
gtk_tree_view_column_cell_get_size (completion->priv->column, NULL,
NULL, NULL, NULL, &height);
+ gtk_widget_style_get (GTK_WIDGET (completion->priv->tree_view),
+ "vertical-separator", &vertical_separator,
+ NULL);
+
+ height += vertical_separator;
+
if (items <= 0)
gtk_widget_hide (completion->priv->scrolled_window);
else
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 7d1eaabf8e..d1978ecb40 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -4587,6 +4587,7 @@ validate_row (GtkTreeView *tree_view,
GList *list;
gint height = 0;
gint horizontal_separator;
+ gint vertical_separator;
gint focus_line_width;
gint depth = gtk_tree_path_get_depth (path);
gboolean retval = FALSE;
@@ -4609,6 +4610,7 @@ validate_row (GtkTreeView *tree_view,
"focus-padding", &focus_pad,
"focus-line-width", &focus_line_width,
"horizontal-separator", &horizontal_separator,
+ "vertical-separator", &vertical_separator,
NULL);
for (list = tree_view->priv->columns; list; list = list->next)
@@ -4633,9 +4635,7 @@ validate_row (GtkTreeView *tree_view,
if (!is_separator)
{
- tmp_width += 2 * focus_line_width;
- tmp_height += 2 * focus_line_width;
-
+ tmp_height += vertical_separator;
height = MAX (height, tmp_height);
height = MAX (height, tree_view->priv->expander_size);
}