Commit 9e3b2554 authored by Jean Felder's avatar Jean Felder Committed by Marinus Schraal

albumwidget: Port to new style

parent 47c65bc3
......@@ -18,6 +18,12 @@
font-weight: bold;
}
.disc-label {
background-color: @theme_bg_color;
color: alpha(@theme_fg_color, 0.8);
padding: 12px 0;
}
/* ArtistAlbumsWidget */
box#ArtistAlbumsWidget .artist-label {
font-weight: bold;
......@@ -51,12 +57,13 @@ box#ArtistAlbumsWidget .artist-label {
font-weight: bold;
}
.songs-list {
/* FIXME: Remove once songsview is ported to the new style */
.songs-list-old {
box-shadow: inset 0 -1px shade(@borders, 1.30);
background-color: @theme_bg_color;
}
.songs-list:selected {
.songs-list-old:selected {
color: @theme_fg_color;
border-color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}
......@@ -95,11 +102,25 @@ box#ArtistAlbumsWidget .artist-label {
font-weight: bold;
}
/* PlaylistDialog */
.playlistdialog-row {
/* Lists style */
.disc-list-box > row {
padding: 0px;
}
.songs-list {
border: 1px solid rgba(0, 0, 0, 0.1);
}
.songs-list > row {
padding: 10px 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.songs-list > row:last-child {
border-bottom: none;
}
.playlistdialog-row:selected {
color: @theme_fg_color;
background-color: @theme_insensitive_bg_color;
......
......@@ -220,13 +220,9 @@
<property name="hexpand">True</property>
<property name="shadow_type">none</property>
<child>
<!-- TODO: The top of the coverart is the same vertical -->
<!-- position as the top of the album songs, however -->
<!-- since we set a top margins for the discbox -->
<!-- subtract that margin here. A cleaner solution is appreciated. -->
<object class="DiscListBox" id="_listbox">
<property name="can_focus">False</property>
<property name="margin_top">48</property>
<property name="margin_top">64</property>
<property name="margin_bottom">64</property>
<property name="margin_end">32</property>
<property name="selection_mode">0</property>
......
......@@ -6,17 +6,16 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="margin_top">16</property>
<child>
<object class="GtkLabel" id="_disc_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">60</property>
<property name="margin_bottom">4</property>
<property name="halign">fill</property>
<!-- <property name="hexpand">True</property> -->
<property name="no_show_all">True</property>
<property name="xalign">0.0</property>
<style>
<class name="dim-label"/>
<class name="disc-label"/>
</style>
</object>
<packing>
......@@ -28,9 +27,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<!-- <property name="orientation">vertical</property> -->
<!-- <property name="homogeneous">True</property> -->
<property name="selection_mode">none</property>
<style>
<class name="songs-list"/>
</style>
</object>
<packing>
<property name="position">1</property>
......
......@@ -62,10 +62,6 @@ class PlaylistsView(BaseView):
self._window = window
self.player = player
# self._view.get_style_context().add_class('songs-list')
# self._add_list_renderers()
self._pl_ctrls = PlaylistControls()
self._pl_ctrls.connect('playlist-renamed', self._on_playlist_renamed)
......@@ -140,6 +136,7 @@ class PlaylistsView(BaseView):
self._box.pack_start(view_container, True, True, 0)
self._view = Gtk.ListBox()
self._view.get_style_context().add_class("songs-list")
self._controller = Gtk.GestureMultiPress().new(self._view)
self._controller.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
......
......@@ -58,7 +58,7 @@ class SongsView(BaseView):
self._offset = 0
self._iter_to_clean = None
self._view.get_style_context().add_class('songs-list')
self._view.get_style_context().add_class('songs-list-old')
self._add_list_renderers()
......
......@@ -197,6 +197,8 @@ class DiscListBox(Gtk.ListBox):
self._selection_mode = False
self._selected_items = []
self.get_style_context().add_class("disc-list-box")
@log
def get_selected_items(self):
"""Returns all selected items for all discs
......
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