mirror of
https://github.com/fjvallarino/monomer.git
synced 2024-11-13 00:11:06 +03:00
Follow focus if overlay status of the nodes matches
This commit is contained in:
parent
6e4cad7218
commit
24e99ec311
@ -275,8 +275,9 @@ makeScroll config state = widget where
|
||||
focusInst = widgetFindByPath (node ^. L.widget) wenv focusPath node
|
||||
focusVp = focusInst ^? _Just . L.viewport
|
||||
focusOverlay = focusInst ^? _Just . L.overlay == Just True
|
||||
overlayMatch = focusOverlay == node ^. L.info . L.overlay
|
||||
result
|
||||
| follow && not focusOverlay = focusVp >>= scrollTo wenv node
|
||||
| follow && overlayMatch = focusVp >>= scrollTo wenv node
|
||||
| otherwise = Nothing
|
||||
ButtonAction point btn status _ -> result where
|
||||
leftPressed = status == PressedBtn && btn == wenv ^. L.mainButton
|
||||
|
2
tasks.md
2
tasks.md
@ -542,6 +542,7 @@
|
||||
- Fix books labels
|
||||
- Check if using WidgetId in MoveFocus and SetFocus is possible
|
||||
- Auto scroll affects dropdown when listView is displayed
|
||||
- Ignore overlays if scroll is not an overlay
|
||||
|
||||
- Pending
|
||||
- Add header in all files, indicating license and documenting what the module does
|
||||
@ -556,6 +557,7 @@ Next
|
||||
- Validate nested structures update correctly when disabling/enabling parent
|
||||
- Something of generative art (OpenGL example)
|
||||
- Send message to scroll to reset position when content changes
|
||||
- Also scroll to focused element on init
|
||||
- This is for listView. Maybe a config argument is needed, since this is not always desired?
|
||||
|
||||
Future
|
||||
|
Loading…
Reference in New Issue
Block a user