move labels on cover panel to the right and use CSS for styling
This commit is contained in:
parent
898f59bd42
commit
c031630379
3 changed files with 98 additions and 97 deletions
|
@ -406,11 +406,6 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="cover-panel">
|
<object class="GtkBox" id="cover-panel">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="homogeneous">True</property>
|
||||||
|
@ -463,37 +458,14 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="padding">10</property>
|
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScale" id="cover-songs">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="round_digits">1</property>
|
|
||||||
<property name="draw_value">False</property>
|
|
||||||
<signal name="button-press-event" handler="on_cover-songs_button_press_event" swapped="no"/>
|
|
||||||
<signal name="button-release-event" handler="on_cover-songs_button_release_event" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="padding">10</property>
|
|
||||||
<property name="pack_type">end</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="padding">10</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="GtkGrid">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -507,7 +479,7 @@
|
||||||
<object class="GtkLabel" id="cover-album">
|
<object class="GtkLabel" id="cover-album">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Album</property>
|
<property name="label">Album</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
|
@ -518,7 +490,7 @@
|
||||||
<object class="GtkLabel" id="cover-date">
|
<object class="GtkLabel" id="cover-date">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Date</property>
|
<property name="label">Date</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
|
@ -529,18 +501,46 @@
|
||||||
<object class="GtkLabel" id="cover-artist">
|
<object class="GtkLabel" id="cover-artist">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Artist</property>
|
<property name="label">Artist</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="cover-labels"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="padding">10</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale" id="cover-songs">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="draw_value">False</property>
|
||||||
|
<signal name="button-press-event" handler="on_cover-songs_button_press_event" swapped="no"/>
|
||||||
|
<signal name="button-release-event" handler="on_cover-songs_button_release_event" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="padding">10</property>
|
<property name="padding">10</property>
|
||||||
|
<property name="pack_type">end</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
|
@ -11,6 +11,13 @@
|
||||||
border:none;
|
border:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cover-labels label {
|
||||||
|
font-size:larger;
|
||||||
|
}
|
||||||
|
.cover-labels label:first-child {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
iconview.view:selected,
|
iconview.view:selected,
|
||||||
iconview.view:selected:focus,
|
iconview.view:selected:focus,
|
||||||
GtkIconView.cell:selected,
|
GtkIconView.cell:selected,
|
||||||
|
|
|
@ -816,27 +816,21 @@ class CoverPanel(mcg.Base):
|
||||||
|
|
||||||
def set_album(self, album):
|
def set_album(self, album):
|
||||||
# Set labels
|
# Set labels
|
||||||
self._album_title_label.set_markup(
|
self._album_title_label.set_label(
|
||||||
"<b><big>{}</big></b>".format(
|
|
||||||
GObject.markup_escape_text(
|
GObject.markup_escape_text(
|
||||||
album.get_title()
|
album.get_title()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
self._album_date_label.set_markup(
|
self._album_date_label.set_markup(
|
||||||
"<big>{}</big>".format(
|
|
||||||
GObject.markup_escape_text(
|
GObject.markup_escape_text(
|
||||||
', '.join(album.get_dates())
|
', '.join(album.get_dates())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
self._album_artist_label.set_markup(
|
self._album_artist_label.set_markup(
|
||||||
"<big>{}</big>".format(
|
|
||||||
GObject.markup_escape_text(
|
GObject.markup_escape_text(
|
||||||
', '.join(album.get_artists())
|
', '.join(album.get_artists())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
# Set tracks
|
# Set tracks
|
||||||
self._set_tracks(album)
|
self._set_tracks(album)
|
||||||
|
|
Loading…
Reference in a new issue