fix(slint): release cards show year + quality badge; Load more polished
Two release-grid issues from the latest user pass.
Release cards (Discography / EPs & Singles / Live / Compilations /
Others):
- map_release was leaving year, quality_tier and quality_label as
empty strings, so the shared AlbumCard had nothing to render for
the badge (no Hi-Res / CD pill) and showed the artist name as
the subtitle (redundant on the artist's own page).
- Now populates `year` from `release.dates.original` (first 4
chars), `quality_tier` from `audio_info.maximum_bit_depth` via
the existing `tier()` helper, and `quality_label` as the
"24-bit / 96 kHz" string the badge tooltip expects.
- card_to_item re-routes the year into the AlbumCard's `artist`
field so the subtitle reads "2026" / "2020" / "1997" instead of
"Julieta Venegas" — matches Tauri's artist page.
Load more / View less:
- Centered (was left-aligned), no background and no border, 4px
gap above so it sits separated from the last visible row
instead of looking glued to it. Hover treatment is a simple
text-color flip (Theme.text-primary on hover) rather than the
panel-style bg + border the button had before.
cc
This commit is contained in:
2 files changed
+36
-17
No files matched your search
@@ -679,26 +679,24 @@ export component ArtistPageView inherits Rectangle {
|
||||
root.media-action(kind, id, action);
|
||||
}
|
||||
}
|
||||
// Load more / View less — same affordance, label flips
|
||||
// with the expanded state. Tauri only shows Load more;
|
||||
// Load more / View less — centered text-only affordance
|
||||
// sitting 4px below the last visible row. The label flips
|
||||
// with the expanded state (Tauri only shows Load more;
|
||||
// View less is a Slint-side improvement so users can
|
||||
// collapse back to the 5-track preview without scrolling.
|
||||
// collapse back to the 5-track preview without scrolling).
|
||||
if ArtistState.top-tracks.length > root.top-tracks-preview: Rectangle { height: 4px; }
|
||||
if ArtistState.top-tracks.length > root.top-tracks-preview: HorizontalLayout {
|
||||
alignment: start;
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
width: load-more-text.preferred-width + 32px;
|
||||
height: 32px;
|
||||
border-radius: Radius.sm;
|
||||
border-width: 1px;
|
||||
border-color: Theme.border-subtle;
|
||||
background: load-more-ta.has-hover
|
||||
? Theme.surface-elevated
|
||||
: Theme.surface-card;
|
||||
width: load-more-text.preferred-width + 24px;
|
||||
height: 28px;
|
||||
load-more-text := Text {
|
||||
text: root.top-tracks-expanded
|
||||
? @tr("View less")
|
||||
: @tr("Load more");
|
||||
color: Theme.text-secondary;
|
||||
color: load-more-ta.has-hover
|
||||
? Theme.text-primary
|
||||
: Theme.text-secondary;
|
||||
font-size: 13px;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
|
||||
Reference in new issue
Block a user