A solution for the size issues

This commit is contained in:
jaby 2025-01-27 20:14:02 +00:00
parent 57a76bbe27
commit 09bb3bed37
2 changed files with 19 additions and 13 deletions

View File

@ -3,21 +3,26 @@ import { FileTab } from "./file-tab.slint";
import { TabWidget } from "std-widgets.slint";
export component MainWindow inherits Window {
min-width: vram_tab.width;
min-height: vram_tab.height;
min-width: tab_widget.width;
min-height: tab_widget.height;
tab_widget := TabWidget {
x: 0px;
y: 0px;
width: tab.width;
height: tab.height;
TabWidget {
current-index: 1;
file_tab := Tab {
title: "File Bah" + root.min-width/1px;
Tab {
title: "File Bah";
FileTab {
x: 0px;
y: 0px;
}
}
vram_tab := Tab {
test := Tab {
title: "VRAM Layout";
MainTab {
tab := MainTab {
x: 0px;
y: 0px;
}

View File

@ -2,15 +2,16 @@ import { VRAMArea } from "./vram-components.slint";
import { GroupBox } from "std-widgets.slint";
export component MainTab inherits Rectangle {
width: group.width;
height: group.height;
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
group := GroupBox {
title: "VRAM Layout";
x: 4px;
y: 4px;
VerticalLayout {
Rectangle {
background_rect := Rectangle {
width: background_image.width + 8px;
height: background_image.height + 8px;
border-width: 4px;
@ -23,13 +24,13 @@ export component MainTab inherits Rectangle {
img_y: 0;
}
// Extend these from input some how
VRAMArea {
/*VRAMArea {
x: 4px;
y: 4px;
img: @image-url("../../../../examples/PoolBox/assets/IMG_6921.png");
img_x: 80;
img_y: 80;
}
}*/
}
}
}