[gnome-boxes] icon-view: Set action popover relative to thumbnail
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] icon-view: Set action popover relative to thumbnail
- Date: Mon, 8 Jan 2018 09:36:27 +0000 (UTC)
commit 1847faaaf0be37bd4a1d7833648074b559f49b36
Author: Felipe Borges <felipeborges gnome org>
Date: Thu Jan 4 14:31:45 2018 +0100
icon-view: Set action popover relative to thumbnail
This way we can guarantee that the popover won't be weirdly
positioned based on the length of the machine name.
https://bugzilla.gnome.org/show_bug.cgi?id=791839
src/icon-view-child.vala | 4 ++--
src/icon-view.vala | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/icon-view-child.vala b/src/icon-view-child.vala
index 473a2b1..778aacc 100644
--- a/src/icon-view-child.vala
+++ b/src/icon-view-child.vala
@@ -35,7 +35,7 @@ private class Boxes.IconViewChild : Gtk.Box {
[GtkChild]
private Gtk.Stack stack;
[GtkChild]
- private Gtk.Image thumbnail;
+ public Gtk.Image thumbnail;
[GtkChild]
private Gtk.Spinner spinner;
[GtkChild]
@@ -88,4 +88,4 @@ private class Boxes.IconViewChild : Gtk.Box {
else
favorite.clear ();
}
-}
\ No newline at end of file
+}
diff --git a/src/icon-view.vala b/src/icon-view.vala
index ead02ac..28cbf35 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -201,8 +201,10 @@ private class Boxes.IconView: Gtk.ScrolledWindow, Boxes.ICollectionView, Boxes.U
if (item == null)
return false;
+ var thumbnail = (child.get_child () as IconViewChild).thumbnail;
+
context_popover.update_for_item (item);
- context_popover.set_relative_to (child);
+ context_popover.set_relative_to (thumbnail);
context_popover.show ();
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]