padding. esc to close palette

master
Dustin Swan 1 week ago
parent 91e9ccd92e
commit 6ca485bf1d
Signed by: dustinswan
GPG Key ID: 30D46587E2100467

@ -97,6 +97,7 @@ palette = config \
(nth effectiveIndex results
| Some (Item data) \ { state = state, emit = [onSelect data.label] }
| _ \ { state = state, emit = [] })
| Key { key = "Escape" } \ { state = state, emit = [osState.palette.visible := False] }
| _ \ { state = state, emit = [] },
view = state emit \

@ -211,7 +211,9 @@ tree = config \
paths = visiblePaths config.value config.path state.expanded;
selectedPath = (nth state.selectedIndex paths) | Some item \ Some item.path | None \ None;
scrollable {
ui.padding {
amount = 8,
child = scrollable {
w = config.w,
h = config.h,
totalWidth = config.w,
@ -221,4 +223,5 @@ tree = config \
onScroll = delta \ emit (Scrolled delta),
child = treeNode { value = config.value, path = config.path, depth = 0, expanded = state.expanded, onToggle = onToggle, selectedPath = selectedPath, prefix = "", editing = state.editing, onDoneEditing = onDoneEditing, onEditLeaf = onEditLeaf }
}
}
};

Loading…
Cancel
Save