subtract TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real

Fri Apr 19 21:06:39 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
        TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
        size for the tree (fixes #72729),
        (gtk_tree_view_real_start_editing): correct cell_area->y for
        scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
This commit is contained in:
Kristian Rietveld 2002-04-19 19:02:26 +00:00 committed by Kristian Rietveld
parent d3a1294923
commit a1f3d61d50
7 changed files with 55 additions and 1 deletions

View File

@ -1,3 +1,11 @@
Fri Apr 19 21:06:39 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
size for the tree (fixes #72729),
(gtk_tree_view_real_start_editing): correct cell_area->y for
scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename

View File

@ -1,3 +1,11 @@
Fri Apr 19 21:06:39 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
size for the tree (fixes #72729),
(gtk_tree_view_real_start_editing): correct cell_area->y for
scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename

View File

@ -1,3 +1,11 @@
Fri Apr 19 21:06:39 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
size for the tree (fixes #72729),
(gtk_tree_view_real_start_editing): correct cell_area->y for
scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename

View File

@ -1,3 +1,11 @@
Fri Apr 19 21:06:39 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
size for the tree (fixes #72729),
(gtk_tree_view_real_start_editing): correct cell_area->y for
scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename

View File

@ -1,3 +1,11 @@
Fri Apr 19 21:06:39 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
size for the tree (fixes #72729),
(gtk_tree_view_real_start_editing): correct cell_area->y for
scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename

View File

@ -1,3 +1,11 @@
Fri Apr 19 21:06:39 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
size for the tree (fixes #72729),
(gtk_tree_view_real_start_editing): correct cell_area->y for
scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename

View File

@ -1650,7 +1650,7 @@ gtk_tree_view_size_allocate (GtkWidget *widget,
tree_view->priv->vadjustment->lower = 0;
tree_view->priv->vadjustment->upper = MAX (tree_view->priv->vadjustment->page_size, tree_view->priv->height);
if (tree_view->priv->vadjustment->value + allocation->height > tree_view->priv->height)
if (tree_view->priv->vadjustment->value + allocation->height - TREE_VIEW_HEADER_HEIGHT (tree_view) > tree_view->priv->height)
gtk_adjustment_set_value (tree_view->priv->vadjustment,
MAX (tree_view->priv->height - tree_view->priv->vadjustment->page_size, 0));
gtk_adjustment_changed (tree_view->priv->vadjustment);
@ -10647,9 +10647,15 @@ gtk_tree_view_real_start_editing (GtkTreeView *tree_view,
GdkEvent *event,
guint flags)
{
gint pre_val = tree_view->priv->vadjustment->value;
tree_view->priv->edited_column = column;
_gtk_tree_view_column_start_editing (column, GTK_CELL_EDITABLE (cell_editable));
gtk_tree_view_real_set_cursor (tree_view, path, FALSE, TRUE);
cell_area->y += pre_val - tree_view->priv->vadjustment->value;
GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
gtk_tree_view_put (tree_view,
GTK_WIDGET (cell_editable),