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:
3 files changed
+16
-7
No files matched your search
@@ -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 { }
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user