Support about tab

This commit is contained in:
jaby 2025-01-27 20:57:23 +00:00
parent 09bb3bed37
commit 112e61e92d
4 changed files with 37 additions and 5 deletions

View File

@ -0,0 +1,10 @@
import { AboutSlint } from "std-widgets.slint";
export component AboutTab {
VerticalLayout {
AboutSlint {}
Text {
x: 8pt;
text: "TIM_Tool Version 0.1.0";
}
}
}

View File

@ -1,5 +1,6 @@
import { MainTab } from "./main-tab.slint";
import { AboutTab } from "./about-tab.slint";
import { FileTab } from "./file-tab.slint";
import { MainTab } from "./main-tab.slint";
import { TabWidget } from "std-widgets.slint";
export component MainWindow inherits Window {
@ -14,18 +15,22 @@ export component MainWindow inherits Window {
current-index: 1;
Tab {
title: "File Bah";
title: "File";
FileTab {
x: 0px;
y: 0px;
}
}
test := Tab {
Tab {
title: "VRAM Layout";
tab := MainTab {
x: 0px;
y: 0px;
}
}
Tab {
title: "About";
AboutTab {}
}
}
}

View File

@ -1,5 +1,5 @@
import { VRAMArea } from "./vram-components.slint";
import { GroupBox } from "std-widgets.slint";
import { GroupBox, StandardListView } from "std-widgets.slint";
export component MainTab inherits Rectangle {
width: group.width + group.x*2;
@ -32,6 +32,22 @@ export component MainTab inherits Rectangle {
img_y: 80;
}*/
}
HorizontalLayout {
GroupBox {
title: "Added Files";
StandardListView {
width: background_image.width/2;
height: 128px;
model: [ { text: "Blue"}, { text: "Red" }, { text: "Green" },
{ text: "Yellow" }, { text: "Black"}, { text: "White"},
{ text: "Magenta" }, { text: "Cyan" },
];
}
}
GroupBox {
title: "Current File";
}
}
}
}
}

View File

@ -1,3 +1,4 @@
// TODO: Maybe make them inherit Windows...?
component VRAMSegment inherits Rectangle {
in property <image> img;
in property <int> clip_x;