fix(slint): toolbar vertical align, header toggle, queue menu clicks

The Discover toolbar's side layouts had no explicit height, so they
filled the 56px bar and y resolved to 0 — the tab pill, genre filter
and gear stuck to the top instead of centering. Both now carry
height = preferred-height.

The header sidebar toggle dropped from a 19px to a 14px icon: it now
matches the nav-tab icon size and tint, and the 30px box centers it
on whole pixels (was 5.5px → blurry).

The queue row's click TouchArea was declared after the content, so it
sat on top and ate the context-menu button's clicks — the [...] just
skipped to the track. It is now declared before the content, so the
menu button keeps its own clicks.

cc
This commit is contained in:
vicrodh committed 2026-05-19 04:32:37 -06:00
1 parent c73e7ac767
commit 3aa902292e
3 files changed
+22 -12

No files matched your search

@@ -151,6 +151,10 @@ export component HomeView inherits Rectangle {
x: 32px;
y: (parent.height - self.height) / 2;
width: self.preferred-width;
// Explicit height too — without it the layout fills the
// 56px toolbar, so `y` resolves to 0 and the tab pill
// sticks to the top instead of centering.
height: self.preferred-height;
spacing: 16px;
VerticalLayout {
alignment: center;
@@ -179,6 +183,7 @@ export component HomeView inherits Rectangle {
x: parent.width - self.width - 32px;
y: (parent.height - self.height) / 2;
width: self.preferred-width;
height: self.preferred-height;
spacing: 6px;
GenreButton { }
// Per-tab sort / show-hide control for the Discover
+6 -3
View File
@@ -22,13 +22,16 @@ component SidebarToggle inherits Rectangle {
width: 30px;
height: 30px;
// 14px matches the nav-tab icons; with the 30px box the centering
// math ((30-14)/2 = 8) lands on whole pixels so the glyph stays
// crisp. Tint matches the tab icons (secondary, primary on hover).
QbzIcon {
source: @image-url("../assets/icons/panel-left.svg");
width: 19px;
height: 19px;
width: 14px;
height: 14px;
x: (parent.width - self.width) / 2;
y: (parent.height - self.height) / 2;
tint: Theme.text-primary;
tint: ta.has-hover ? Theme.text-primary : Theme.text-secondary;
}
ta := TouchArea {
+11 -9
View File
@@ -128,6 +128,17 @@ component QueueRow inherits Rectangle {
background: ta.has-hover ? Theme.surface-hover : transparent;
border-radius: Radius.sm;
// Declared before the content so the context-menu button (which has
// its own TouchArea) renders on top and keeps its own clicks. A row
// TouchArea declared after the content would sit on top and eat the
// menu-button clicks — making the [...] just skip to the track.
ta := TouchArea {
mouse-cursor: pointer;
clicked => {
root.clicked();
}
}
HorizontalLayout {
padding-left: Spacing.sm;
padding-right: Spacing.xs;
@@ -226,15 +237,6 @@ component QueueRow inherits Rectangle {
}
}
ta := TouchArea {
// The menu trigger sits above this area and consumes its own
// clicks, so a row click never doubles as a menu open.
mouse-cursor: pointer;
clicked => {
root.clicked();
}
}
// Per-track context menu — 1:1 with the Tauri queue track menu.
// Only "Remove from queue" is wired; the rest are placeholders.
track-menu := PopupWindow {