If child is not visible because of viewport, set info.visible to False

This commit is contained in:
Francisco Vallarino 2020-12-08 16:54:26 -03:00
parent b2343816dc
commit 08ac246177
2 changed files with 8 additions and 7 deletions

View File

@ -585,6 +585,7 @@ resizeWrapper container wenv viewport renderArea node = newNode where
newChildNode = tempChildNode
& L.info . L.viewport .~ (if keepSizes then icvp else vp)
& L.info . L.renderArea .~ (if keepSizes then icra else ra)
& L.info . L.visible .~ isWidgetVisible tempChildNode viewport
newChildren = resize <$> Seq.zip children assigned
newNode
| resizeRequired || vpChanged || raChanged = tempNode
@ -617,7 +618,7 @@ renderContainer rHandler renderer wenv node =
drawStyledAction renderer renderArea style $ \_ -> do
rHandler renderer wenv node
forM_ children $ \child -> when (isWidgetVisible child viewport) $
forM_ children $ \child -> when (child ^. L.info . L.visible) $
widgetRender (child ^. L.widget) renderer wenv child
where
style = activeStyle wenv node

View File

@ -320,6 +320,7 @@
- Do not hover if mouse drag on different widget
- Fix selectOnBlur for dropdown
- Rename WidgetInstance to WidgetNodeStatus (or similar)
- Check dropdown's list not being properly located after resize/scroll (not clear)
- Pending
- Add testing
@ -337,24 +338,23 @@
- Add user documentation
Maybe postponed after release?
- Restore focus to previous widget when zstack changes (dialog situation)
- Also think about not losing focus because of click (when onlyTopFocusable is active)
- ZStack should set _weIsTopLayer based on used space
- Avoid resizing non visible elements (stack/grid)
- Avoid findNextFocus on unfocusable children (listView items)
- Does this make sense? Check with a composite listView item
- Focus event may need to be handled to update highlighted item
- Check dropdown's list not being properly located after resize/scroll (not clear)
- Draw close button on Dialog
- Remove createThemed and move Alert/Dialog to use composite
- Draw close button on Dialog
- Set focus on ButtonDown, not Click
- Can it be handled in Single/Container?
- Restore focus to previous widget when zstack changes (dialog situation)
- Also think about not losing focus because of click (when onlyTopFocusable is active)
- ZStack should set _weIsTopLayer based on used space
- Image
- Can performance be improved? Use sbt functions?
- Does adding function to return imgData from Renderer make sense? Replace imageExists?
- Remove delay logic when adding an image
- When adding image, on failure remove an the least used image and retry
- Make sure WidgetTask/Node association is preserved if node location changes
- Make sure WidgetTask/Node association is preserved if node location in tree changes
- Further textField improvements
- Handle undo history
- Handle mouse selection