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
|
(nth effectiveIndex results
|
||||||
| Some (Item data) \ { state = state, emit = [onSelect data.label] }
|
| Some (Item data) \ { state = state, emit = [onSelect data.label] }
|
||||||
| _ \ { state = state, emit = [] })
|
| _ \ { state = state, emit = [] })
|
||||||
|
| Key { key = "Escape" } \ { state = state, emit = [osState.palette.visible := False] }
|
||||||
| _ \ { state = state, emit = [] },
|
| _ \ { state = state, emit = [] },
|
||||||
|
|
||||||
view = state emit \
|
view = state emit \
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,9 @@ tree = config \
|
||||||
paths = visiblePaths config.value config.path state.expanded;
|
paths = visiblePaths config.value config.path state.expanded;
|
||||||
selectedPath = (nth state.selectedIndex paths) | Some item \ Some item.path | None \ None;
|
selectedPath = (nth state.selectedIndex paths) | Some item \ Some item.path | None \ None;
|
||||||
|
|
||||||
scrollable {
|
ui.padding {
|
||||||
|
amount = 8,
|
||||||
|
child = scrollable {
|
||||||
w = config.w,
|
w = config.w,
|
||||||
h = config.h,
|
h = config.h,
|
||||||
totalWidth = config.w,
|
totalWidth = config.w,
|
||||||
|
|
@ -221,4 +223,5 @@ tree = config \
|
||||||
onScroll = delta \ emit (Scrolled delta),
|
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 }
|
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