forked from AuroraMiddleware/gtk
This commit includes a fix for #169463, Stefan Kost.
2005-06-19 Kristian Rietveld <kris@gtk.org> This commit includes a fix for #169463, Stefan Kost. * gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size): when cell_area is set, return cell_area width/height as width/height, so the focus rectangle will be drawn correctly. * gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get of focus-line-width property, (validate_row): take focus_line_width into account. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action): also take focus_line_width into account when calculating the cell_area y and height (before, we only took it into account when calculating x and width).
This commit is contained in:
parent
a2ea759334
commit
d4fdc6b7a9
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2005-06-19 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
This commit includes a fix for #169463, Stefan Kost.
|
||||
|
||||
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
|
||||
when cell_area is set, return cell_area width/height as width/height,
|
||||
so the focus rectangle will be drawn correctly.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
|
||||
of focus-line-width property,
|
||||
(validate_row): take focus_line_width into account.
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
|
||||
also take focus_line_width into account when calculating the cell_area
|
||||
y and height (before, we only took it into account when calculating
|
||||
x and width).
|
||||
|
||||
2005-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
|
@ -1,3 +1,20 @@
|
||||
2005-06-19 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
This commit includes a fix for #169463, Stefan Kost.
|
||||
|
||||
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
|
||||
when cell_area is set, return cell_area width/height as width/height,
|
||||
so the focus rectangle will be drawn correctly.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
|
||||
of focus-line-width property,
|
||||
(validate_row): take focus_line_width into account.
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
|
||||
also take focus_line_width into account when calculating the cell_area
|
||||
y and height (before, we only took it into account when calculating
|
||||
x and width).
|
||||
|
||||
2005-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
|
@ -1,3 +1,20 @@
|
||||
2005-06-19 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
This commit includes a fix for #169463, Stefan Kost.
|
||||
|
||||
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
|
||||
when cell_area is set, return cell_area width/height as width/height,
|
||||
so the focus rectangle will be drawn correctly.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
|
||||
of focus-line-width property,
|
||||
(validate_row): take focus_line_width into account.
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
|
||||
also take focus_line_width into account when calculating the cell_area
|
||||
y and height (before, we only took it into account when calculating
|
||||
x and width).
|
||||
|
||||
2005-06-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
|
@ -306,6 +306,19 @@ gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell,
|
||||
|
||||
if (height)
|
||||
*height = MIN (cellprogress->priv->min_h, h);
|
||||
|
||||
/* FIXME: at the moment cell_area is only set when we are requesting
|
||||
* the size for drawing the focus rectangle. We now just return
|
||||
* the last size we used for drawing the progress bar, which will
|
||||
* work for now. Not a really nice solution though.
|
||||
*/
|
||||
if (cell_area)
|
||||
{
|
||||
if (width)
|
||||
*width = cell_area->width;
|
||||
if (height)
|
||||
*height = cell_area->height;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3771,7 +3771,6 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
GtkRBTree *tree = NULL;
|
||||
GtkRBNode *node = NULL;
|
||||
gint width;
|
||||
gint focus_line_width;
|
||||
|
||||
switch (tree_view->priv->drag_dest_pos)
|
||||
{
|
||||
@ -3793,7 +3792,6 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
break;
|
||||
gdk_drawable_get_size (tree_view->priv->bin_window,
|
||||
&width, NULL);
|
||||
gtk_widget_style_get (widget, "focus-line-width", &focus_line_width, NULL);
|
||||
gtk_paint_focus (widget->style,
|
||||
tree_view->priv->bin_window,
|
||||
GTK_WIDGET_STATE (widget),
|
||||
@ -4553,6 +4551,7 @@ validate_row (GtkTreeView *tree_view,
|
||||
GList *list;
|
||||
gint height = 0;
|
||||
gint horizontal_separator;
|
||||
gint focus_line_width;
|
||||
gint depth = gtk_tree_path_get_depth (path);
|
||||
gboolean retval = FALSE;
|
||||
gboolean is_separator = FALSE;
|
||||
@ -4572,6 +4571,7 @@ validate_row (GtkTreeView *tree_view,
|
||||
|
||||
gtk_widget_style_get (GTK_WIDGET (tree_view),
|
||||
"focus-padding", &focus_pad,
|
||||
"focus-line-width", &focus_line_width,
|
||||
"horizontal-separator", &horizontal_separator,
|
||||
NULL);
|
||||
|
||||
@ -4597,6 +4597,9 @@ validate_row (GtkTreeView *tree_view,
|
||||
|
||||
if (!is_separator)
|
||||
{
|
||||
tmp_width += 2 * focus_line_width;
|
||||
tmp_height += 2 * focus_line_width;
|
||||
|
||||
height = MAX (height, tmp_height);
|
||||
height = MAX (height, tree_view->priv->expander_size);
|
||||
}
|
||||
|
@ -2710,6 +2710,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
|
||||
real_background_area = *background_area;
|
||||
|
||||
real_cell_area.x += focus_line_width;
|
||||
real_cell_area.y += focus_line_width;
|
||||
real_cell_area.height -= 2 * focus_line_width;
|
||||
|
||||
/* Find out how much extra space we have to allocate */
|
||||
for (list = tree_column->cell_list; list; list = list->next)
|
||||
|
Loading…
Reference in New Issue
Block a user