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.
This commit is contained in:
Jehan 2021-02-25 18:48:23 +01:00
parent 59f3d0097c
commit 1ba3c3d4b5
1 changed files with 4 additions and 0 deletions

View File

@ -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);