feat(slint): add slim-card grid for Popular albums
Add a compact "slim" card variant and a 4-column grid section that
renders it, used for the Popular albums row on Discover Home.
- SlimCard: 60px row with optional rank, 44px thumbnail, title/subtitle
- GridSection: 4-column grid; cards absolutely positioned since Slint
GridLayout cannot host a `for`
- state.slint: SlimItem struct and HomeState.popular model
- home.rs: load_home now returns HomeData { sections, popular };
map_slim maps the discover most-streamed container
- artwork pipeline: ArtworkTarget enum routes decoded covers to either
a section card or a popular card
cc
This commit is contained in:
7 files changed
+279
-35
No files matched your search
@@ -10,6 +10,7 @@ import { Theme } from "../foundation/semantic-colors.slint";
|
||||
import { Typography } from "../foundation/typography.slint";
|
||||
import { HomeState } from "../state.slint";
|
||||
import { Carousel } from "Carousel.slint";
|
||||
import { GridSection } from "GridSection.slint";
|
||||
import { QbzIcon } from "../primitives/QbzIcon.slint";
|
||||
import { ScrollView } from "std-widgets.slint";
|
||||
|
||||
@@ -174,6 +175,14 @@ export component HomeView inherits Rectangle {
|
||||
root.album-clicked(id);
|
||||
}
|
||||
}
|
||||
|
||||
if HomeState.popular.length > 0: GridSection {
|
||||
title: @tr("Popular albums");
|
||||
items: HomeState.popular;
|
||||
item-clicked(id) => {
|
||||
root.album-clicked(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user