padding. esc to close palette
This commit is contained in:
parent
91e9ccd92e
commit
6ca485bf1d
2 changed files with 13 additions and 9 deletions
|
|
@ -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,14 +211,17 @@ tree = config \
|
|||
paths = visiblePaths config.value config.path state.expanded;
|
||||
selectedPath = (nth state.selectedIndex paths) | Some item \ Some item.path | None \ None;
|
||||
|
||||
scrollable {
|
||||
w = config.w,
|
||||
h = config.h,
|
||||
totalWidth = config.w,
|
||||
totalHeight = totalH,
|
||||
scrollX = 0,
|
||||
scrollY = state.scrollY,
|
||||
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 }
|
||||
ui.padding {
|
||||
amount = 8,
|
||||
child = scrollable {
|
||||
w = config.w,
|
||||
h = config.h,
|
||||
totalWidth = config.w,
|
||||
totalHeight = totalH,
|
||||
scrollX = 0,
|
||||
scrollY = state.scrollY,
|
||||
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…
Add table
Add a link
Reference in a new issue