[gnome-music/wip/mschraal/gtk4-v3: 113/192] appmenu: Inherit from GtkPopover instead of GtkPopoverMenu




commit b6a381db47cc20eed9a62f89139249c3ad7c2daf
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Feb 2 18:52:43 2022 +0100

    appmenu: Inherit from GtkPopover instead of GtkPopoverMenu
    
    GtkPopoverMenu is meant to be used with a menu model.
    
    Update the spacing and margin accordingly to get the same layout as
    GtkPopoverMenu.

 data/ui/AppMenu.ui            | 4 ++--
 gnomemusic/widgets/appmenu.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/AppMenu.ui b/data/ui/AppMenu.ui
index 826a0c9eb..b5adf606e 100644
--- a/data/ui/AppMenu.ui
+++ b/data/ui/AppMenu.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <template class="AppMenu" parent="GtkPopoverMenu">
+  <template class="AppMenu" parent="GtkPopover">
     <property name="focusable">False</property>
     <child>
       <object class="GtkBox">
@@ -9,6 +9,7 @@
         <property name="margin-end">6</property>
         <property name="margin-start">6</property>
         <property name="margin-top">6</property>
+        <property name="spacing">6</property>
         <property name="orientation">vertical</property>
         <child>
           <object class="GtkModelButton" id="lastfm_account_button">
@@ -22,7 +23,6 @@
         <child>
           <object class="GtkBox" id="_lastfm_box">
             <property name="margin-end">5</property>
-            <property name="margin-start">5</property>
             <property name="visible">False</property>
             <child>
               <object class="GtkLabel">
diff --git a/gnomemusic/widgets/appmenu.py b/gnomemusic/widgets/appmenu.py
index b14641626..c0baecb72 100644
--- a/gnomemusic/widgets/appmenu.py
+++ b/gnomemusic/widgets/appmenu.py
@@ -28,7 +28,7 @@ from gnomemusic.scrobbler import GoaLastFM
 
 
 @Gtk.Template(resource_path="/org/gnome/Music/ui/AppMenu.ui")
-class AppMenu(Gtk.PopoverMenu):
+class AppMenu(Gtk.Popover):
     """AppMenu shown from the HeaderBar within the main view"""
 
     __gtype_name__ = "AppMenu"


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