[gnome-boxes/set-actionpopover-relative-to-thumbnails-parent-widget: 2/2] icon-view: Make ActionsPopover relative to the thumbnail's container



commit 5eec9c811224baefefa63bc10894908cc447d20e
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Jun 9 12:07:16 2020 +0200

    icon-view: Make ActionsPopover relative to the thumbnail's container
    
    IconViewChild objects have a GtkStack to switch between showing the
    thumbnail of the guest and the spinner we present when an express
    installation is ongoing.
    
    By setting the ActionsPopover relative_to the parent widget of the
    thumbnail we can guarantee it will be set correctly for when we
    show the spinner instead.
    
    Fixes #247

 src/icon-view.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/icon-view.vala b/src/icon-view.vala
index 5ab3e58c..e0a75176 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -214,7 +214,7 @@ private bool launch_context_popover_for_child (Gtk.FlowBoxChild child) {
         var thumbnail = icon_view_child.thumbnail;
 
         context_popover.update_for_item (item);
-        context_popover.set_relative_to (thumbnail);
+        context_popover.set_relative_to (thumbnail.get_parent ());
         context_popover.show ();
 
         return true;


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