[gnome-music/wip/gbsneto/flowbox: 3/13] data: add AlbumCover widget



commit a090b75d79c07ac65ac03fa0db9deb6a6065249e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Aug 9 02:58:30 2016 -0300

    data: add AlbumCover widget
    
    Now that we're moving away from a cellrenderer-based
    rendering, all visible elements are Gtk widgets, forcing
    us to customly manage the albums.
    
    This commit introduces the AlbumCover UI definition, which
    will be consumend in the future when creating albums
    for the flowbox.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760164

 data/AlbumCover.ui             |   61 ++++++++++++++++++++++++++++++++++++++++
 data/gnome-music.gresource.xml |    1 +
 2 files changed, 62 insertions(+), 0 deletions(-)
---
diff --git a/data/AlbumCover.ui b/data/AlbumCover.ui
new file mode 100644
index 0000000..f550709
--- /dev/null
+++ b/data/AlbumCover.ui
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.18"/>
+  <object class="GtkBox" id="main_box">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkOverlay">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_bottom">4</property>
+        <child>
+          <object class="GtkImage" id="image">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="vexpand">True</property>
+            <property name="valign">end</property>
+            <property name="halign">center</property>
+          </object>
+        </child>
+        <child type="overlay">
+          <object class="GtkCheckButton" id="check">
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="halign">end</property>
+            <property name="valign">end</property>
+            <property name="draw_indicator">True</property>
+            <style>
+              <class name="osd"/>
+            </style>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkLabel" id="title">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="max_width_chars">22</property>
+        <property name="ellipsize">middle</property>
+        <property name="tooltip_text" bind-source="title" bind-property="label" bind-flags="default" />
+      </object>
+    </child>
+    <child>
+      <object class="GtkLabel" id="subtitle">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="max_width_chars">22</property>
+        <property name="ellipsize">middle</property>
+        <property name="tooltip_text" bind-source="subtitle" bind-property="label" bind-flags="default" />
+        <attributes>
+          <attribute name="scale" value="0.88"/>
+        </attributes>
+        <style>
+          <class name="dim-label"/>
+        </style>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/data/gnome-music.gresource.xml b/data/gnome-music.gresource.xml
index 88f1225..6bc6a1b 100644
--- a/data/gnome-music.gresource.xml
+++ b/data/gnome-music.gresource.xml
@@ -5,6 +5,7 @@
     <file alias="gtk/menus.ui" preprocess="xml-stripblanks">app-menu.ui</file>
     <file>application.css</file>
     <file>initial-state.png</file>
+    <file preprocess="xml-stripblanks">AlbumCover.ui</file>
     <file preprocess="xml-stripblanks">AlbumWidget.ui</file>
     <file preprocess="xml-stripblanks">ArtistAlbumWidget.ui</file>
     <file preprocess="xml-stripblanks">ArtistAlbumsWidget.ui</file>


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