[fractal/single-popover] directory: Use server_chooser_popover just once



commit bf685d0fd0855ef99dc847045f21cdd27c7412e2
Author: Daniel GarcĂ­a Moreno <dani danigm net>
Date:   Tue May 19 19:13:33 2020 +0200

    directory: Use server_chooser_popover just once
    
    It's not recommended to use the same gtk::Popover object attached to two
    different gtk::MenuButton because the popover has a parent and has an
    attached to to place it correctly and having this object attached to two
    different buttons causes some misplacements.
    
    This patch changes the layout to use the HdySqueezer inside the
    MenuButton, this way we only have one menu button with two layouts
    instead of two different MenuButtons.
    
    This should fix the wrong placement of the directory popover.

 fractal-gtk/res/ui/main_window.ui | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)
---
diff --git a/fractal-gtk/res/ui/main_window.ui b/fractal-gtk/res/ui/main_window.ui
index 58c227a7..eb898ade 100644
--- a/fractal-gtk/res/ui/main_window.ui
+++ b/fractal-gtk/res/ui/main_window.ui
@@ -683,13 +683,13 @@
                       </object>
                     </child>
                     <child>
-                      <object class="HdySqueezer">
+                      <object class="GtkMenuButton" id="server_chooser_menu">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="popover">server_chooser_popover</property>
                         <child>
-                          <object class="GtkMenuButton" id="server_chooser_menu">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="popover">server_chooser_popover</property>
+                          <object class="HdySqueezer">
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">True</property>
@@ -721,16 +721,6 @@
                                 </child>
                               </object>
                             </child>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkMenuButton" id="server_chooser_menu_small">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="popover">server_chooser_popover</property>
-                            <property name="hexpand">False</property>
-                            <property name="halign">end</property>
                             <child>
                               <object class="GtkBox">
                                 <property name="visible">True</property>


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