fix(slint): crisp button icons, tighter tabs, homologate nav buttons

Icon buttons (header lyrics/queue/hamburger, queue footer) centered
their glyph at a fractional offset (e.g. (36-19)/2 = 8.5px), which
renders blurry — the offset is now rounded to whole pixels. The
header tab spacing dropped from 4px to 2px. The Discover toolbar's
back/forward pair drifted 3px from where the album/artist/settings
views place it; both toolbar clusters now anchor their vertical
center to y=25 so the [<] [>] pair holds one position across views.

cc
This commit is contained in:
vicrodh committed 2026-05-19 05:05:17 -06:00
1 parent 9a964477e5
commit 862d408789
3 files changed
+16 -7

No files matched your search

+8 -2
View File
@@ -149,7 +149,12 @@ export component HomeView inherits Rectangle {
// overlap the right controls.
left-controls := HorizontalLayout {
x: 32px;
y: (parent.height - self.height) / 2;
// Align the toolbar content's vertical center to y=25 —
// 11px (the back/forward padding-top used by the album /
// artist / settings views) + 14px (half the 28px nav
// buttons). Keeps the [<] [>] pair at the same screen
// position across every view, with no jump on navigation.
y: 25px - 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
@@ -181,7 +186,8 @@ export component HomeView inherits Rectangle {
// on top of the history arrows.
right-controls := HorizontalLayout {
x: parent.width - self.width - 32px;
y: (parent.height - self.height) / 2;
// Same y baseline as the left controls (see above).
y: 25px - self.height / 2;
width: self.preferred-width;
height: self.preferred-height;
spacing: 6px;
+5 -3
View File
@@ -217,8 +217,10 @@ component HeaderIconButton inherits Rectangle {
source: root.icon;
width: 19px;
height: 19px;
x: (parent.width - self.width) / 2;
y: (parent.height - self.height) / 2;
// Round the centering to whole pixels — a fractional offset
// (here 8.5px) makes the glyph render blurry.
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
tint: root.active ? Theme.accent
: ta.has-hover ? Theme.text-primary : Theme.text-secondary;
}
@@ -248,7 +250,7 @@ export component HeaderBar inherits Rectangle {
x: Spacing.md;
y: (root.height - self.height) / 2;
height: 30px;
spacing: Spacing.xs;
spacing: 2px;
VerticalLayout {
alignment: center;
SidebarToggle { }
+3 -2
View File
@@ -79,8 +79,9 @@ component IconButton inherits Rectangle {
source: root.icon;
width: root.icon-size;
height: root.icon-size;
x: (parent.width - self.width) / 2;
y: (parent.height - self.height) / 2;
// Round to whole pixels — a fractional offset renders blurry.
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
tint: !root.enabled
? Theme.text-disabled
: (root.active