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