summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2003-06-09 19:04:47 +0000
committerKristian Rietveld <kristian@src.gnome.org>2003-06-09 19:04:47 +0000
commit7ac4f264a7e34ed1e06d34679b4189a036886bb0 (patch)
treea4c8ca252dd3ef20b2a09e1d47038138bd8e7510
parent378a7488fb8abdbb50c5eec585846aef33798a7a (diff)
downloadgdk-pixbuf-7ac4f264a7e34ed1e06d34679b4189a036886bb0.tar.gz
Remove the weird dx logic, get all cell_area and background_area
Mon Jun 9 21:01:16 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action): Remove the weird dx logic, get all cell_area and background_area calculations right. Not sure what was up with it before. (Fixes #110989, testcase from Vasco Alexandre da Silva Costa). * NEWS: Updated for this bug.
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.pre-2-109
-rw-r--r--ChangeLog.pre-2-49
-rw-r--r--ChangeLog.pre-2-69
-rw-r--r--ChangeLog.pre-2-89
-rw-r--r--NEWS2
-rw-r--r--gtk/gtktreeviewcolumn.c30
7 files changed, 62 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 1efc3e1a5..27efefbfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Jun 9 21:01:16 2003 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
+ Remove the weird dx logic, get all cell_area and background_area
+ calculations right. Not sure what was up with it before. (Fixes
+ #110989, testcase from Vasco Alexandre da Silva Costa).
+
+ * NEWS: Updated for this bug.
+
Sun Jun 8 23:43:47 2003 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 1efc3e1a5..27efefbfb 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,12 @@
+Mon Jun 9 21:01:16 2003 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
+ Remove the weird dx logic, get all cell_area and background_area
+ calculations right. Not sure what was up with it before. (Fixes
+ #110989, testcase from Vasco Alexandre da Silva Costa).
+
+ * NEWS: Updated for this bug.
+
Sun Jun 8 23:43:47 2003 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 1efc3e1a5..27efefbfb 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,12 @@
+Mon Jun 9 21:01:16 2003 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
+ Remove the weird dx logic, get all cell_area and background_area
+ calculations right. Not sure what was up with it before. (Fixes
+ #110989, testcase from Vasco Alexandre da Silva Costa).
+
+ * NEWS: Updated for this bug.
+
Sun Jun 8 23:43:47 2003 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 1efc3e1a5..27efefbfb 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,12 @@
+Mon Jun 9 21:01:16 2003 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
+ Remove the weird dx logic, get all cell_area and background_area
+ calculations right. Not sure what was up with it before. (Fixes
+ #110989, testcase from Vasco Alexandre da Silva Costa).
+
+ * NEWS: Updated for this bug.
+
Sun Jun 8 23:43:47 2003 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 1efc3e1a5..27efefbfb 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,12 @@
+Mon Jun 9 21:01:16 2003 Kristian Rietveld <kris@gtk.org>
+
+ * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
+ Remove the weird dx logic, get all cell_area and background_area
+ calculations right. Not sure what was up with it before. (Fixes
+ #110989, testcase from Vasco Alexandre da Silva Costa).
+
+ * NEWS: Updated for this bug.
+
Sun Jun 8 23:43:47 2003 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
diff --git a/NEWS b/NEWS
index 22906b169..dec0d9225 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,8 @@ Overview of Changes in GTK+ 2.2.2
- Fix prelighting [Sven Neumann]
- Set drag cursor earlier to allow apps to override [Daniel Elstner]
- Speed up insertions into GtkTreeModelSort [Owen, Jonathan Blandford]
+ - Get background/cell area handling right in GtkTreeViewColumn [Vasco
+ Alexandre da Silva Costa]
- Bug fixes [Benjamin Bayart, Jonathan Blandford, Peter Bloomfield,
Dave Cook, Felipe Heidrich, Richard Hult, Markus Lausser, Michael Natterer,
Mariano Suarez-Alvarez, Owen]
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 123af17b7..aab52702f 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -2412,8 +2412,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
gint extra_space;
gint min_x, min_y, max_x, max_y;
gint focus_line_width;
- gint dx;
gint special_cells;
+ gint horizontal_separator;
gboolean cursor_row = FALSE;
min_x = G_MAXINT;
@@ -2451,11 +2451,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
gtk_widget_style_get (GTK_WIDGET (tree_column->tree_view),
"focus-line-width", &focus_line_width,
+ "horizontal-separator", &horizontal_separator,
NULL);
real_cell_area = *cell_area;
real_background_area = *background_area;
- dx = real_cell_area.x - real_background_area.x - focus_line_width;
real_cell_area.x += focus_line_width;
@@ -2472,7 +2472,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
full_requested_width += info->requested_width;
}
- extra_space = background_area->width - full_requested_width - dx;
+ extra_space = cell_area->width + horizontal_separator - full_requested_width;
if (extra_space < 0)
extra_space = 0;
else if (extra_space > 0 && expand_cell_count > 0)
@@ -2494,11 +2494,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
else
flags &= ~GTK_CELL_RENDERER_FOCUSED;
- real_background_area.width = info->requested_width +
- (info->expand?extra_space:0);
- info->real_width = real_background_area.width;
+ info->real_width = info->requested_width + (info->expand?extra_space:0);
- real_cell_area.width = real_background_area.width;
+ real_cell_area.width = info->real_width;
+ real_background_area.width=
+ real_cell_area.x + real_cell_area.width - real_background_area.x;
real_cell_area.width -= 2 * focus_line_width;
if (action == CELL_ACTION_RENDER)
@@ -2617,8 +2617,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
flags &= ~GTK_CELL_RENDERER_FOCUSED;
- real_cell_area.x += (info->real_width + tree_column->spacing);
- real_background_area.x += (info->real_width + tree_column->spacing);
+ real_cell_area.x += (real_cell_area.width + tree_column->spacing);
+ real_background_area.x += (real_background_area.width + tree_column->spacing);
}
/* iterate list for PACK_END cells */
@@ -2637,11 +2637,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
else
flags &= ~GTK_CELL_RENDERER_FOCUSED;
- real_background_area.width = info->requested_width +
- (info->expand?extra_space:0);
- info->real_width = real_background_area.width;
+ info->real_width = info->requested_width + (info->expand?extra_space:0);
- real_cell_area.width = real_background_area.width;
+ real_cell_area.width = info->real_width;
+ real_background_area.width =
+ real_cell_area.x + real_cell_area.width - real_background_area.x;
real_cell_area.width -= 2 * focus_line_width;
if (action == CELL_ACTION_RENDER)
@@ -2759,8 +2759,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
flags &= ~GTK_CELL_RENDERER_FOCUSED;
- real_cell_area.x += (info->real_width + tree_column->spacing);
- real_background_area.x += (info->real_width + tree_column->spacing);
+ real_cell_area.x += (real_cell_area.width + tree_column->spacing);
+ real_background_area.x += (real_background_area.width + tree_column->spacing);
}
/* fill focus_rectangle when required */