Skip to content

Commit 82ec6f8

Browse files
committed
Refactor UI components and update accent color use for improved aesthetics
1 parent aab1993 commit 82ec6f8

File tree

6 files changed

+54
-47
lines changed

6 files changed

+54
-47
lines changed

data/ui/window.blp

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -127,51 +127,54 @@ template $VictrolaMainWindow : He.ApplicationWindow {
127127

128128
Bis.AlbumPage {
129129
child:
130-
Box infogrid {
131-
orientation: vertical;
132-
hexpand-set: true;
133-
134-
He.AppBar info_title {
135-
show-back: bind album.folded;
136-
show-left-title-buttons: bind album.folded;
137-
show-right-title-buttons: true;
138-
139-
[titlebar-toggle]
140-
ToggleButton lyrics_btn {
141-
icon-name: "show-lyrics-symbolic";
142-
tooltip-text: _("Show Lyrics");
130+
Box infogrid {
131+
orientation: vertical;
132+
hexpand-set: true;
133+
134+
He.AppBar info_title {
135+
show-back: bind album.folded;
136+
show-left-title-buttons: bind album.folded;
137+
show-right-title-buttons: true;
138+
139+
[titlebar-toggle]
140+
ToggleButton lyrics_btn {
141+
icon-name: "show-lyrics-symbolic";
142+
tooltip-text: _("Show Lyrics");
143+
}
143144
}
144-
}
145145

146-
Stack infostack {
147-
StackPage {
148-
name: "info";
149-
child:
150-
Box info_box {
151-
orientation: vertical;
152-
vexpand: true;
153-
154-
styles [
155-
"side-pane"
156-
]
146+
He.Bin infobin {
147+
child: Stack infostack {
148+
StackPage {
149+
name: "info";
150+
child:
151+
Box info_box {
152+
orientation: vertical;
153+
vexpand: true;
154+
155+
styles [
156+
"side-pane"
157+
]
158+
}
159+
;
157160
}
158-
;
159-
}
160-
161-
StackPage {
162-
name: "lyrics";
163-
child:
164-
Box lyrics_box {
165-
orientation: vertical;
166-
vexpand: true;
167161

168-
styles [
169-
"side-pane"
170-
]
162+
StackPage {
163+
name: "lyrics";
164+
child:
165+
Box lyrics_box {
166+
orientation: vertical;
167+
vexpand: true;
168+
169+
styles [
170+
"side-pane"
171+
]
172+
}
173+
;
171174
}
172-
;
173175
}
174-
}
176+
;
177+
}
175178
}
176179
;
177180
}

src/Widgets/info-page.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ namespace Victrola {
6060
cover_art = new Gtk.Image ();
6161
cover_art.width_request = 256;
6262
cover_art.height_request = 256;
63+
cover_art.pixel_size = 256;
6364
cover_art.halign = Gtk.Align.CENTER;
6465
cover_art.valign = Gtk.Align.CENTER;
6566
cover_art.add_css_class ("cover-art");
6667

6768
cover_blur = new Gtk.Image ();
6869
cover_blur.width_request = 256;
6970
cover_blur.height_request = 256;
71+
cover_blur.pixel_size = 256;
7072
cover_blur.halign = Gtk.Align.CENTER;
7173
cover_blur.valign = Gtk.Align.CENTER;
7274
cover_blur.add_css_class ("cover-art-blur");

src/application.vala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,8 @@ namespace Victrola {
124124

125125
protected override void startup () {
126126
Gdk.RGBA accent_color = { 0 };
127-
accent_color.parse ("#F7812B");
128-
default_accent_color = { accent_color.red* 255, accent_color.green* 255, accent_color.blue* 255 };
129-
override_accent_color = true;
130-
is_content = true;
127+
accent_color.parse ("#f99e5c");
128+
default_accent_color = { accent_color.red, accent_color.green, accent_color.blue };
131129

132130
resource_base_path = "/com/fyralabs/Victrola";
133131

src/window.vala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ namespace Victrola {
5656
private unowned Gtk.Box info_box_mobile;
5757
[GtkChild]
5858
public unowned Gtk.Overlay about_overlay;
59+
[GtkChild]
60+
public unowned He.Bin infobin;
5961

6062
private string _search_text = "";
6163
private string _search_property = "";
@@ -210,6 +212,8 @@ namespace Victrola {
210212
info_box.add_css_class ("side-pane");
211213
}
212214
});
215+
216+
infobin.content_color_override = true;
213217
}
214218

215219
private async void on_bind_item (Gtk.SignalListItemFactory factory, Object item) {
@@ -414,11 +418,11 @@ namespace Victrola {
414418
if (top != 0) {
415419
Gdk.RGBA accent_color = { 0 };
416420
accent_color.parse (He.hexcode_argb (top));
417-
app.default_accent_color = { accent_color.red* 255, accent_color.green* 255, accent_color.blue* 255 };
421+
infobin.content_source_color = { accent_color.red, accent_color.green, accent_color.blue };
418422
} else {
419423
Gdk.RGBA accent_color = { 0 };
420-
accent_color.parse ("#F7812B");
421-
app.default_accent_color = { accent_color.red* 255, accent_color.green* 255, accent_color.blue* 255 };
424+
accent_color.parse ("#f99e5c");
425+
infobin.content_source_color = { accent_color.red, accent_color.green, accent_color.blue };
422426
}
423427
loop.quit ();
424428
});

subprojects/.wraplock

Whitespace-only changes.

subprojects/blueprint-compiler.wrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[wrap-git]
22
directory = blueprint-compiler
3-
url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git
3+
url = https://gitlab.gnome.org/gnome/blueprint-compiler.git
44
revision = main
55
depth = 1
66

0 commit comments

Comments
 (0)