Update dependencies

This commit is contained in:
Vyn 2024-11-22 18:05:29 +01:00
parent 828de30570
commit 4c6942552d
5 changed files with 32 additions and 15 deletions

View file

@ -1,5 +1,5 @@
import { State, ListSource } from "./state.slint";
import { VText, VTextInput , VButton, ToggleButton, VActionButton, Svg, Palette } from "@selenite";
import { VText, VTextInput , VButton, ToggleButton, VActionButton, VPopupIconMenu, Svg, Palette } from "@selenite";
import { ComboBox } from "std-widgets.slint";
export component AppWindow inherits Window {
@ -139,7 +139,7 @@ export component AppWindow inherits Window {
private property <int> number-of-items: State.current-list.animes.length;
private property <length> grid-spacing: 16px;
private property <length> item-min-width: 300px;
private property <length> item-min-width: 256px;
private property <int> item-per-row: floor(self.viewport-width / (item-min-width + grid-spacing));
private property <length> item-width: (parent.width - ((item-per-row - 1) * grid-spacing)) / item-per-row;
@ -155,8 +155,6 @@ export component AppWindow inherits Window {
height: item-height;
//background: #444444;
VerticalLayout {
height: parent.height;
width: parent.width;
@ -171,6 +169,25 @@ export component AppWindow inherits Window {
source: anime.image;
image-fit: ImageFit.cover;
}
popup := VPopupIconMenu {
VActionButton {
icon-svg: Svg.trash;
icon-colorize: Colors.red;
icon-size: 1.5rem;
border-radius: 0;
clicked => {
// TODO : Missing feature to delete json value in rei-json
}
}
}
TouchArea {
pointer-event(e) => {
if (e.button == PointerEventButton.right && e.kind == PointerEventKind.up) {
popup.show(self.mouse-x, self.mouse-y);
}
}
}
}
animeTitle := VText {
text: anime.title;