Function for panel_section

This commit is contained in:
Candifloss 2026-09-04 15:13:19 +05:30
parent ba3ad612dc
commit 7138d9914f
2 changed files with 12 additions and 13 deletions

View File

@ -1,5 +1,5 @@
import "nbcl/components/datetime_widg.nbcl" as datetime_widg { * } import "nbcl/components/datetime_widg.nbcl" as datetime_widg { * }
import "nbcl/panel/panel_section.nbcl" as datetime_widg { * } import "nbcl/panel/panel_section.nbcl" as panel_section { * }
component EwwiiPanel () { component EwwiiPanel () {
Box { Box {
@ -10,17 +10,8 @@ component EwwiiPanel () {
width = config.panel_width width = config.panel_width
space_evenly = true space_evenly = true
PanelSection "section_left" { panel_section.panel_section("left", "start")
section_side = "left" panel_section.panel_section("center", "center")
widg_align = "start" panel_section.panel_section("right", "end")
}
PanelSection "section_left" {
section_side = "center"
widg_align = "center"
}
PanelSection "section_left" {
section_side = "right"
widg_align = "end"
}
} }
} }

View File

@ -1,4 +1,5 @@
# 3 Sections of the panel # 3 Sections of the panel
component PanelSection (section_side, widg_align) { component PanelSection (section_side, widg_align) {
Box { Box {
orinetation = "horizontal" orinetation = "horizontal"
@ -17,3 +18,10 @@ component PanelSection (section_side, widg_align) {
} }
} }
} }
fn panel_section(section_side, widg_align) {
PanelSection "section_${section_side}" {
section_side = section_side
widg_align = widg_align
}
}