resizeable left bar

This commit is contained in:
Alessandro Mauri 2025-12-04 19:45:18 +01:00
parent db613d5130
commit 59eb5ff636
4 changed files with 41 additions and 3 deletions

37
.ecode/project_build.json Normal file
View File

@ -0,0 +1,37 @@
{
"Debug": {
"build": [
{
"args": "-j8",
"command": "make",
"working_dir": ""
}
],
"build_types": [],
"clean": [
{
"args": "clean",
"command": "c3c",
"working_dir": ""
}
],
"config": {
"clear_sys_env": false
},
"os": [],
"output_parser": {
"config": {
"preset": "generic",
"relative_file_paths": true
}
},
"run": [
{
"args": "",
"command": "build/ugui",
"name": "Custom Executable",
"working_dir": ""
}
]
}
}

@ -1 +1 @@
Subproject commit 19051914535410d0d0aef304a1582d1566bd2993 Subproject commit 60bec17d36aa2fd1bddb3ffd4413bbfe867b6716

View File

@ -1,4 +1,5 @@
div { div {
padding: 5px;
bg: #282828; bg: #282828;
fg: #fbf1c7ff; fg: #fbf1c7ff;
primary: #cc241dff; primary: #cc241dff;

View File

@ -79,9 +79,9 @@ fn int main(String[] args)
static usz which_vm = 0; static usz which_vm = 0;
ui.@div(ugui::@grow(), ugui::@grow()) { ui.@div(ugui::@grow(), ugui::@grow()) {
ui.@div(ugui::@fit((short)(ui.width*0.4)), ugui::@grow(), COLUMN, scroll_x: true, scroll_y: true) { ui.@div(ugui::@fit((short)(ui.width*0.4)), ugui::@grow(), COLUMN, scroll_x: false, scroll_y: true, resize: {.right = true}) {
foreach (idx, &vm : vm_list) { foreach (idx, &vm : vm_list) {
Id id = ui.@div(ugui::@grow(), ugui::@fit(50), ROW, LEFT, false,{},false,false, idx) { Id id = ui.@div(ugui::@grow(), ugui::@fit(50), ROW, LEFT, false,{},false,false, {}, idx) {
ui.sprite("vm", 48, idx)!!; ui.sprite("vm", 48, idx)!!;
ui.text(vm.name, idx)!!; ui.text(vm.name, idx)!!;
ui.separator(ugui::@grow(), ugui::@exact(1), idx)!!; ui.separator(ugui::@grow(), ugui::@exact(1), idx)!!;