Skip to content

Commit 406b425

Browse files
committed
Enhance mobile UI by adding background color to side pane and refining mobile info bin structure
1 parent 82ec6f8 commit 406b425

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

data/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
}
8484
.side-pane {
8585
border-radius: 12px;
86+
background: @surface_container_low_bg_color;
8687
margin: 0 8px 8px 8px;
8788
box-shadow: 0 0 0 1px @outline;
8889
}

data/ui/window.blp

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,25 @@ template $VictrolaMainWindow : He.ApplicationWindow {
110110
}
111111
}
112112

113-
Box info_box_mobile {
114-
orientation: vertical;
115-
visible: bind album.folded;
116-
}
117-
He.NavigationRail {
118-
stack: stack;
119-
orientation: horizontal;
120-
visible: bind album.folded;
121-
styles [
122-
"music-navrail"
123-
]
113+
He.Bin mobile_infobin {
114+
child:
115+
Box {
116+
orientation: vertical;
117+
118+
Box info_box_mobile {
119+
orientation: vertical;
120+
visible: bind album.folded;
121+
}
122+
He.NavigationRail {
123+
stack: stack;
124+
orientation: horizontal;
125+
visible: bind album.folded;
126+
styles [
127+
"music-navrail"
128+
]
129+
}
130+
}
131+
;
124132
}
125133
};
126134
}

src/Widgets/play-bar-mobile.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ namespace Victrola {
4848
cover_art = new Gtk.Image ();
4949
cover_art.width_request = 64;
5050
cover_art.height_request = 64;
51+
cover_art.pixel_size = 64;
5152
cover_art.halign = Gtk.Align.CENTER;
5253
cover_art.valign = Gtk.Align.CENTER;
5354
cover_art.add_css_class ("cover-art");
5455

5556
cover_blur = new Gtk.Image ();
5657
cover_blur.width_request = 64;
5758
cover_blur.height_request = 64;
59+
cover_blur.pixel_size = 64;
5860
cover_blur.halign = Gtk.Align.CENTER;
5961
cover_blur.valign = Gtk.Align.CENTER;
6062
cover_blur.add_css_class ("cover-art-blur");

src/window.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ namespace Victrola {
5858
public unowned Gtk.Overlay about_overlay;
5959
[GtkChild]
6060
public unowned He.Bin infobin;
61+
[GtkChild]
62+
public unowned He.Bin mobile_infobin;
6163

6264
private string _search_text = "";
6365
private string _search_property = "";
@@ -214,6 +216,7 @@ namespace Victrola {
214216
});
215217

216218
infobin.content_color_override = true;
219+
mobile_infobin.content_color_override = true;
217220
}
218221

219222
private async void on_bind_item (Gtk.SignalListItemFactory factory, Object item) {
@@ -419,10 +422,12 @@ namespace Victrola {
419422
Gdk.RGBA accent_color = { 0 };
420423
accent_color.parse (He.hexcode_argb (top));
421424
infobin.content_source_color = { accent_color.red, accent_color.green, accent_color.blue };
425+
mobile_infobin.content_source_color = { accent_color.red, accent_color.green, accent_color.blue };
422426
} else {
423427
Gdk.RGBA accent_color = { 0 };
424428
accent_color.parse ("#f99e5c");
425429
infobin.content_source_color = { accent_color.red, accent_color.green, accent_color.blue };
430+
mobile_infobin.content_source_color = { accent_color.red, accent_color.green, accent_color.blue };
426431
}
427432
loop.quit ();
428433
});

0 commit comments

Comments
 (0)