[gnome-music/wip/jfelder/gtk4-v3: 239/259] songsview: Add some styling to ListView
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/gtk4-v3: 239/259] songsview: Add some styling to ListView
- Date: Thu, 17 Feb 2022 08:41:26 +0000 (UTC)
commit 570183393dab473ff1b9f38d6ff1fdd0cfd1f651
Author: Jean Felder <jfelder src gnome org>
Date: Sat Feb 12 16:47:30 2022 +0100
songsview: Add some styling to ListView
data/org.gnome.Music.css | 23 +++++++++++++++++++++--
data/ui/SongsView.ui | 5 +++++
2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/data/org.gnome.Music.css b/data/org.gnome.Music.css
index a83448199..04f4b5e66 100644
--- a/data/org.gnome.Music.css
+++ b/data/org.gnome.Music.css
@@ -91,8 +91,27 @@
font-weight: bold;
}
-/* SongWidget */
+/* SongsView */
+/* boxed-list style does not work for
+GtkListView at the moment */
+.songs-list {
+ border-left: 1px solid @borders;
+ border-right: 1px solid @borders;
+ border-top: 1px solid @borders;
+}
+
+.songs-list:first-child {
+ border-top-left-radius: 12px;
+ border-top-right-radius: 12px;
+}
+
+.songs-list:last-child {
+ border-bottom-left-radius: 12px;
+ border-bottom-right-radius: 12px;
+}
-.songwidget {
+/* SongWidget and SongsView rows*/
+.songwidget,
+.songs-list row {
padding: 12px;
}
diff --git a/data/ui/SongsView.ui b/data/ui/SongsView.ui
index 58aaaebc0..714423f8a 100644
--- a/data/ui/SongsView.ui
+++ b/data/ui/SongsView.ui
@@ -2,6 +2,8 @@
<interface>
<requires lib="gtk" version="4.0"/>
<template class="SongsView" parent="GtkBox">
+ <property name="margin-bottom">48</property>
+ <property name="margin-top">48</property>
<child>
<object class="AdwClampScrollable" id="_adw_clamp_scrollable">
<property name="hexpand">True</property>
@@ -12,6 +14,9 @@
<child>
<object class="GtkListView" id="_listview">
<property name="show-separators">True</property>
+ <style>
+ <class name="songs-list"/>
+ </style>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]