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";
export component MainWindow inherits Window {
min-width: tab_widget.width;
min-height: tab_widget.height;
title: "TIM Tool 0.1.0";
width: tab_widget.width;
height: tab_widget.height;
tab_widget := TabWidget {
x: 0px;

View File

@ -1,10 +1,28 @@
import { AboutSlint } from "std-widgets.slint";
export component AboutTab {
y: 0px;
VerticalLayout {
AboutSlint {}
padding: 8px;
alignment: start;
Text {
x: 8pt;
font-size: 24pt;
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 { GroupBox, StandardListView } from "std-widgets.slint";
import { Button, ComboBox, GroupBox, StandardListView } from "std-widgets.slint";
export component MainTab inherits Rectangle {
width: group.width + group.x*2;
@ -15,7 +15,8 @@ export component MainTab inherits Rectangle {
width: background_image.width + 8px;
height: background_image.height + 8px;
border-width: 4px;
border-color: black;
border-color: #404040;
background: #A0A0A0;
background_image := VRAMArea {
x: 4px;
y: 4px;
@ -33,8 +34,12 @@ export component MainTab inherits Rectangle {
}*/
}
HorizontalLayout {
padding: 4px;
GroupBox {
title: "Added Files";
VerticalLayout {
alignment: start;
padding: 4px;
StandardListView {
width: background_image.width/2;
height: 128px;
@ -43,9 +48,31 @@ export component MainTab inherits Rectangle {
{ text: "Magenta" }, { text: "Cyan" },
];
}
HorizontalLayout {
padding: 4px;
Button {
text: "Add File";
}
Button {
text: "Remove File";
}
}
}
}
GroupBox {
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";
}
}
}
}
}