Fix layout scaling issue

This commit is contained in:
Jaby 2025-03-02 00:09:11 +01:00
parent e25cc7ba38
commit 39dace6f6b
1 changed files with 7 additions and 5 deletions

View File

@ -10,7 +10,7 @@ struct VRAMImage {
}
export component MainTab inherits Rectangle {
property <int> test_scale: 2;
property <int> test_scale: 4;
in-out property <image> vram_bg;
in-out property <[StandardListViewItem]> vram_files: [];
in-out property <[VRAMImage]> vram_images: [];
@ -24,11 +24,12 @@ export component MainTab inherits Rectangle {
group := GroupBox {
title: "VRAM Layout";
x: 4px;
y: 4px;
x: 4px;
y: 4px;
width: main_view.width + 2*main_view.x;
VerticalLayout {
ScrollView {
main_view := ScrollView {
width: rect.width/root.test_scale;
height: rect.height/root.test_scale;
viewport-x: 0;
@ -107,13 +108,14 @@ export component MainTab inherits Rectangle {
}
HorizontalLayout {
padding: 4px;
GroupBox {
title: "Added files";
VerticalLayout {
alignment: start;
padding: 4px;
vram_files_list := StandardListView {
width: background_image.width/2;
width: background_image.width/root.test_scale/2;
height: 128px;
model: root.vram_files;