[gnome-boxes/more-backports: 1/3] icon-view: Make ActionsPopover relative to the thumbnail's container



commit 84ffb7dd0ce3a0526aac409aaf24f9d2090d2f9c
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 b9dfe6ca..35f20f88 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -211,7 +211,7 @@ private bool launch_context_popover_for_child (Gtk.FlowBoxChild child) {
         var thumbnail = (child.get_child () as IconViewChild).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]