Introduce Config to NBCL

- Panel height in config file
- Update component name, too
This commit is contained in:
Candifloss 2026-08-22 23:09:45 +05:30
parent f0b919c4ca
commit 74b209b1e6
5 changed files with 9 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
nbcl/config.nbcl

View File

@ -1 +1,2 @@
import "nbcl/config.nbcl" as config
import "nbcl/panel/panel_window.nbcl" as ewwii_panel import "nbcl/panel/panel_window.nbcl" as ewwii_panel

3
nbcl/config.example.nbcl Normal file
View File

@ -0,0 +1,3 @@
# Example config
const panel_height = 27

View File

@ -1,4 +1,4 @@
component PanelComp () { component EwwiiPanel () {
Box { Box {
orinetation = "horizontal" orinetation = "horizontal"
halign = "center" halign = "center"

View File

@ -9,13 +9,13 @@ Window "ewwii_panel" {
anchor = "top center" anchor = "top center"
x = "0px" x = "0px"
y = "0px" y = "0px"
height = "27px" height = config.panel_height.to_string() +"px"
width = "100%" width = "100%"
} }
reserve = { reserve = {
distance = "27px" distance = config.panel_height.to_string() +"px"
side = "top" side = "top"
} }
PanelComp {} EwwiiPanel {}
} }