Commit 1270e050 authored by Jean Felder's avatar Jean Felder Committed by Marinus Schraal

artistalbumwidget: Update to new style

parent a0ed0b16
......@@ -53,7 +53,7 @@ box#ArtistAlbumsWidget .artist-label {
/* ArtistAlbumWidget */
.album-title {
padding-left:24px;
font-size: large;
font-weight: bold;
}
......
......@@ -3,14 +3,17 @@
<interface>
<requires lib="gtk+" version="3.12"/>
<template parent="GtkBox" class="ArtistAlbumWidget">
<property name="margin_top">30</property>
<property name="margin_right">120</property>
<child>
<object class="CoverStack" id="_cover_stack">
<property name="visible">True</property>
<property name="margin_top">20</property>
<property name="margin_right">30</property>
<property name="margin_bottom">20</property>
<property name="margin_left">120</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<style>
<class name="album-cover"/>
</style>
</object>
<packing>
<property name="position">0</property>
......@@ -26,36 +29,18 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="_title">
<object class="GtkLabel" id="_title_year">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">20</property>
<property name="margin_bottom">20</property>
<property name="ellipsize">middle</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<style>
<class name="album-title"/>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="_year">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
......
......@@ -38,8 +38,7 @@ class ArtistAlbumWidget(Gtk.Box):
_album_box = Gtk.Template.Child()
_cover_stack = Gtk.Template.Child()
_disc_list_box = Gtk.Template.Child()
_title = Gtk.Template.Child()
_year = Gtk.Template.Child()
_title_year = Gtk.Template.Child()
selection_mode = GObject.Property(type=bool, default=False)
......@@ -75,10 +74,10 @@ class ArtistAlbumWidget(Gtk.Box):
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
self._title.props.label = corealbum.props.title
self._title_year.props.label = corealbum.props.title
year = corealbum.props.year
if year:
self._year.props.label = year
if year != "----":
self._title_year.props.label += " ({})".format(year)
if self._size_group:
self._size_group.add_widget(self._album_box)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment