[gnome-music/wip/mschraal/albumwidget-remove-eventbox] albumwidget: Remove EventBox use




commit d5585dd533b24aebcc82a3c98735856f1552dd84
Author: Marinus Schraal <mschraal gnome org>
Date:   Mon May 10 23:54:54 2021 +0200

    albumwidget: Remove EventBox use
    
    It was unused.

 data/ui/AlbumWidget.ui            | 317 +++++++++++++++++++-------------------
 gnomemusic/widgets/albumwidget.py |   2 +-
 2 files changed, 157 insertions(+), 162 deletions(-)
---
diff --git a/data/ui/AlbumWidget.ui b/data/ui/AlbumWidget.ui
index 59f6aa238..cf1a153fc 100644
--- a/data/ui/AlbumWidget.ui
+++ b/data/ui/AlbumWidget.ui
@@ -2,210 +2,205 @@
 <!-- Generated with glade 3.20.0 -->
 <interface>
   <requires lib="gtk+" version="3.12"/>
-  <template class="AlbumWidget" parent="GtkEventBox">
+  <template class="AlbumWidget" parent="GtkBox">
     <property name="visible">True</property>
     <style>
       <class name="view"/>
     </style>
+    <property name="can_focus">False</property>
     <child>
-      <object class="GtkBox">
+      <object class="GtkBox" id="albumInfo">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="halign">end</property>
+        <property name="margin-bottom">32</property>
+        <property name="margin-end">32</property>
+        <property name="margin-start">32</property>
+        <property name="margin-top">48</property>
+        <property name="vexpand">True</property>
+        <property name="hexpand">True</property>
         <child>
-          <object class="GtkBox" id="albumInfo">
+          <object class="GtkBox" id="albumDetails">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="halign">end</property>
-            <property name="margin-bottom">32</property>
-            <property name="margin-end">32</property>
-            <property name="margin-start">32</property>
-            <property name="margin-top">48</property>
-            <property name="vexpand">True</property>
-            <property name="hexpand">True</property>
+            <property name="halign">center</property>
+            <property name="valign">start</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">18</property>
             <child>
-              <object class="GtkBox" id="albumDetails">
+              <object class="ArtStack" id="_art_stack">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">center</property>
+                <property name="valign">start</property>
+                <property name="margin-end">1</property>
+                <property name="margin-start">1</property>
+                <property name="hhomogeneous">False</property>
+                <property name="vhomogeneous">False</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkBox" id="artistBox">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="halign">center</property>
                 <property name="valign">start</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">18</property>
+                <property name="spacing">3</property>
                 <child>
-                  <object class="ArtStack" id="_art_stack">
+                  <object class="GtkLabel" id="_title_label">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="halign">center</property>
-                    <property name="valign">start</property>
-                    <property name="margin-end">1</property>
-                    <property name="margin-start">1</property>
-                    <property name="hhomogeneous">False</property>
-                    <property name="vhomogeneous">False</property>
+                    <property name="justify">center</property>
+                    <property name="ellipsize">middle</property>
+                    <style>
+                      <class name="title-artist"/>
+                    </style>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkBox" id="artistBox">
+                  <object class="GtkLabel" id="_artist_label">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="halign">center</property>
-                    <property name="valign">start</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="_title_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">center</property>
-                        <property name="justify">center</property>
-                        <property name="ellipsize">middle</property>
-                        <style>
-                          <class name="title-artist"/>
-                        </style>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="_artist_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">center</property>
-                        <property name="justify">center</property>
-                        <property name="ellipsize">middle</property>
-                        <style>
-                          <class name="title-artist"/>
-                          <class name="dim-label"/>
-                        </style>
-                      </object>
-                    </child>
+                    <property name="justify">center</property>
+                    <property name="ellipsize">middle</property>
+                    <style>
+                      <class name="title-artist"/>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkGrid" id="grid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin-top">21</property>
+                <property name="column_spacing">32</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel" id="released_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="margin-bottom">2</property>
+                    <property name="margin-top">2</property>
+                    <property name="label" translatable="yes">Released</property>
+                    <property name="use_markup">True</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="running_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Running Length</property>
+                    <property name="use_markup">True</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="_released_info_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="margin-bottom">2</property>
+                    <property name="margin-top">2</property>
+                    <property name="label">----</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="_running_info_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label">--:--</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="_composer_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="margin-bottom">2</property>
+                    <property name="margin-top">2</property>
+                    <property name="label" translatable="yes">Composer</property>
+                    <property name="use_markup">True</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
                 </child>
                 <child>
-                  <object class="GtkGrid" id="grid">
+                  <object class="GtkLabel" id="_composer_info_label">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="margin-top">21</property>
-                    <property name="column_spacing">32</property>
-                    <property name="column_homogeneous">True</property>
-                    <child>
-                      <object class="GtkLabel" id="released_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">end</property>
-                        <property name="margin-bottom">2</property>
-                        <property name="margin-top">2</property>
-                        <property name="label" translatable="yes">Released</property>
-                        <property name="use_markup">True</property>
-                        <style>
-                          <class name="dim-label"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="running_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">end</property>
-                        <property name="label" translatable="yes">Running Length</property>
-                        <property name="use_markup">True</property>
-                        <style>
-                          <class name="dim-label"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="_released_info_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="margin-bottom">2</property>
-                        <property name="margin-top">2</property>
-                        <property name="label">----</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="_running_info_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="label">--:--</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="_composer_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">end</property>
-                        <property name="margin-bottom">2</property>
-                        <property name="margin-top">2</property>
-                        <property name="label" translatable="yes">Composer</property>
-                        <property name="use_markup">True</property>
-                        <style>
-                          <class name="dim-label"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="_composer_info_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="margin-bottom">2</property>
-                        <property name="margin-top">2</property>
-                        <property name="ellipsize">end</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
-                      </packing>
-                    </child>
+                    <property name="halign">start</property>
+                    <property name="margin-bottom">2</property>
+                    <property name="margin-top">2</property>
+                    <property name="ellipsize">end</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
                 </child>
               </object>
             </child>
           </object>
         </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkScrolledWindow" id="scrolledWindow">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="hscrollbar_policy">never</property>
         <child>
-          <object class="GtkScrolledWindow" id="scrolledWindow">
+          <object class="GtkViewport" id="_viewport">
+            <property name="width_request">600</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="halign">start</property>
             <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="hscrollbar_policy">never</property>
             <child>
-              <object class="GtkViewport" id="_viewport">
-                <property name="width_request">600</property>
-                <property name="visible">True</property>
+              <object class="DiscListBox" id="_disc_list_box">
                 <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="hexpand">True</property>
-                <child>
-                  <object class="DiscListBox" id="_disc_list_box">
-                    <property name="can_focus">False</property>
-                    <property name="margin-bottom">48</property>
-                    <property name="margin-end">32</property>
-                    <property name="margin-top">48</property>
-                    <property name="selection_mode">0</property>
-                    <property name="visible">True</property>
-                  </object>
-                </child>
+                <property name="margin-bottom">48</property>
+                <property name="margin-end">32</property>
+                <property name="margin-top">48</property>
+                <property name="selection_mode">0</property>
+                <property name="visible">True</property>
               </object>
             </child>
           </object>
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index bdb11d754..81bf52957 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -32,7 +32,7 @@ from gnomemusic.widgets.disclistboxwidget import DiscListBox  # noqa: F401
 
 
 @Gtk.Template(resource_path='/org/gnome/Music/ui/AlbumWidget.ui')
-class AlbumWidget(Gtk.EventBox):
+class AlbumWidget(Gtk.Box):
     """Album widget.
 
     The album widget consists of an image with the album art


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