[gimp] app: fix gimp_item_tree_view_blink_lock().



commit 1ba3c3d4b54e2e725ca3c711c5de13e608c4a415
Author: Jehan <jehan girinstud io>
Date:   Thu Feb 25 18:48:23 2021 +0100

    app: fix gimp_item_tree_view_blink_lock().
    
    The bin window coordinates must be converted to the widget coordinates.
    This was not a problem before, but now with the column header, if I
    don't do this, the position is wrong.
    
    Similarly fix the lock popover position.

 app/widgets/gimpitemtreeview.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index 1d941afbbe..d40708c7fb 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -906,6 +906,8 @@ gimp_item_tree_view_blink_lock (GimpItemTreeView *view,
   gtk_tree_view_get_cell_area (GIMP_CONTAINER_TREE_VIEW (view)->view, path,
                                gtk_tree_view_get_column (GIMP_CONTAINER_TREE_VIEW (view)->view, 1),
                                &rect);
+  gtk_tree_view_convert_bin_window_to_widget_coords (GIMP_CONTAINER_TREE_VIEW (view)->view,
+                                                     rect.x, rect.y, &rect.x, &rect.y);
   gimp_widget_blink_rect (GTK_WIDGET (GIMP_CONTAINER_TREE_VIEW (view)->view), &rect);
 
   gtk_tree_path_free (path);
@@ -1733,6 +1735,8 @@ gimp_item_tree_view_lock_clicked (GtkCellRendererToggle *toggle,
       gtk_tree_view_get_cell_area (GIMP_CONTAINER_TREE_VIEW (view)->view, path,
                                    gtk_tree_view_get_column (GIMP_CONTAINER_TREE_VIEW (view)->view, 1),
                                    &rect);
+      gtk_tree_view_convert_bin_window_to_widget_coords (GIMP_CONTAINER_TREE_VIEW (view)->view,
+                                                         rect.x, rect.y, &rect.x, &rect.y);
       gtk_popover_set_pointing_to (GTK_POPOVER (view->priv->lock_popover), &rect);
 
       gtk_widget_show (view->priv->lock_popover);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]