Support loading and displaying of image palette #16

Merged
jaby merged 17 commits from topic/jb/tim_tool/PaletteSupport into main 2025-03-06 18:11:51 +00:00
1 changed files with 22 additions and 3 deletions
Showing only changes of commit a62728db7b - Show all commits

View File

@ -1,5 +1,5 @@
import { VRAMArea } from "../vram-components.slint";
import { Button, ComboBox, GroupBox, StandardListView, LineEdit, ScrollView } from "std-widgets.slint";
import { Button, ComboBox, GroupBox, StandardListView, LineEdit, ScrollView, Slider } from "std-widgets.slint";
struct VRAMImage {
img: image,
@ -10,7 +10,7 @@ struct VRAMImage {
}
export component MainTab inherits Rectangle {
property <int> test_scale: 4;
property <int> test_scale: 1;
in-out property <image> vram_bg;
in-out property <[StandardListViewItem]> vram_files: [];
in-out property <[VRAMImage]> vram_images: [];
@ -108,7 +108,26 @@ export component MainTab inherits Rectangle {
}
HorizontalLayout {
padding: 4px;
VerticalLayout {
alignment: center;
padding: 4px;
Text {
text: "Scale: " + slider.value;
}
}
slider := Slider {
minimum: 100.0;
maximum: 400.0;
step: 1.0;
value: 100.0;
changed(value) => {
root.test_scale = value/100.0;
}
}
}
HorizontalLayout {
padding: 4px;
GroupBox {
title: "Added files";
VerticalLayout {