Finalize it GUI

This commit is contained in:
jaby 2025-01-27 21:54:21 +00:00
parent 3c67b2ed4b
commit 89229c6e3b
3 changed files with 59 additions and 13 deletions

View File

@ -4,8 +4,9 @@ import { MainTab } from "./tab/main-tab.slint";
import { TabWidget } from "std-widgets.slint"; import { TabWidget } from "std-widgets.slint";
export component MainWindow inherits Window { export component MainWindow inherits Window {
min-width: tab_widget.width; title: "TIM Tool 0.1.0";
min-height: tab_widget.height; width: tab_widget.width;
height: tab_widget.height;
tab_widget := TabWidget { tab_widget := TabWidget {
x: 0px; x: 0px;

View File

@ -1,10 +1,28 @@
import { AboutSlint } from "std-widgets.slint"; import { AboutSlint } from "std-widgets.slint";
export component AboutTab { export component AboutTab {
y: 0px;
VerticalLayout { VerticalLayout {
AboutSlint {} padding: 8px;
alignment: start;
Text { Text {
x: 8pt; font-size: 24pt;
text: "TIM_Tool Version 0.1.0"; text: "TIM_Tool Version 0.1.0";
horizontal-alignment: center;
} }
Text {
font-size: 20pt;
text: "Part of JabyEngine";
horizontal-alignment: center;
}
Text {
font-size: 16pt;
text: "MIT License";
horizontal-alignment: center;
}
Text {
font-size: 16pt;
text: " ";
}
AboutSlint {}
} }
} }

View File

@ -1,5 +1,5 @@
import { VRAMArea } from "../vram-components.slint"; import { VRAMArea } from "../vram-components.slint";
import { GroupBox, StandardListView } from "std-widgets.slint"; import { Button, ComboBox, GroupBox, StandardListView } from "std-widgets.slint";
export component MainTab inherits Rectangle { export component MainTab inherits Rectangle {
width: group.width + group.x*2; width: group.width + group.x*2;
@ -15,7 +15,8 @@ export component MainTab inherits Rectangle {
width: background_image.width + 8px; width: background_image.width + 8px;
height: background_image.height + 8px; height: background_image.height + 8px;
border-width: 4px; border-width: 4px;
border-color: black; border-color: #404040;
background: #A0A0A0;
background_image := VRAMArea { background_image := VRAMArea {
x: 4px; x: 4px;
y: 4px; y: 4px;
@ -33,19 +34,45 @@ export component MainTab inherits Rectangle {
}*/ }*/
} }
HorizontalLayout { HorizontalLayout {
padding: 4px;
GroupBox { GroupBox {
title: "Added Files"; title: "Added Files";
StandardListView { VerticalLayout {
width: background_image.width/2; alignment: start;
height: 128px; padding: 4px;
model: [ { text: "Blue"}, { text: "Red" }, { text: "Green" }, StandardListView {
{ text: "Yellow" }, { text: "Black"}, { text: "White"}, width: background_image.width/2;
{ text: "Magenta" }, { text: "Cyan" }, height: 128px;
]; model: [ { text: "Blue"}, { text: "Red" }, { text: "Green" },
{ text: "Yellow" }, { text: "Black"}, { text: "White"},
{ text: "Magenta" }, { text: "Cyan" },
];
}
HorizontalLayout {
padding: 4px;
Button {
text: "Add File";
}
Button {
text: "Remove File";
}
}
} }
} }
GroupBox { GroupBox {
title: "Current File"; title: "Current File";
VerticalLayout {
padding: 4px;
Rectangle {
width: 128px;
height: 128px;
background: #A0A0A0;
}
ComboBox {
model: ["4-bit", "16-bit", "24-bit"];
current-value: "4-bit";
}
}
} }
} }
} }