[gimp/wip/Jehan/layers-dockable-refresh: 43/105] app: fix gimp_item_tree_view_blink_lock().
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/layers-dockable-refresh: 43/105] app: fix gimp_item_tree_view_blink_lock().
- Date: Thu, 23 Dec 2021 00:44:33 +0000 (UTC)
commit 1c497371cd386b9ed8eabe4bdb3bb1039a181ff6
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 ea46ae5db1..7ab602cdf7 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -920,6 +920,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);
@@ -1747,6 +1749,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]