Fixing pretty print ast. adding a few more builtins :( getting further with inspector
parent
30234875fe
commit
8bc05efa1e
@ -0,0 +1,44 @@
|
||||
inspector = config \
|
||||
windowHeight = 400;
|
||||
windowWidth = 600;
|
||||
|
||||
source = getSource config.name;
|
||||
sourceLines = split "\n" source;
|
||||
_ = debug "source" source;
|
||||
_ = debug "sourceLines" sourceLines;
|
||||
|
||||
dialogPadding = 0;
|
||||
|
||||
textInputHeight = 40;
|
||||
contentWidth = windowWidth - (dialogPadding * 2);
|
||||
contentHeight = windowHeight - (dialogPadding * 2);
|
||||
|
||||
ui.positioned {
|
||||
x = (config.viewport.width - windowWidth) / 2,
|
||||
y = (config.viewport.height - windowHeight) / 2,
|
||||
|
||||
child = ui.stack {
|
||||
children = [
|
||||
# background
|
||||
ui.rect { w = windowWidth, h = windowHeight, color = "#063351", radius = 0, strokeWidth = 1, strokeColor = "#1A5F80" },
|
||||
ui.column {
|
||||
gap = 0,
|
||||
children = mapWithIndex (line i \
|
||||
textInput {
|
||||
key = "palette-query" & (str i),
|
||||
initialValue = line,
|
||||
initialFocus = False,
|
||||
color = "white",
|
||||
backgroundColor = "rgba(0,0,0,0.0)",
|
||||
w = contentWidth,
|
||||
h = textInputHeight,
|
||||
# onChange = text \ batch [config.state.query := text, config.state.focusedIndex := 0],
|
||||
onChange = text \ batch [],
|
||||
onKeyDown = key \ key
|
||||
| _ \ noOp
|
||||
}
|
||||
) sourceLines
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue