Fix grid non visible children handling

This commit is contained in:
Francisco Vallarino 2020-11-09 19:59:32 -03:00
parent 7e04dbb4d5
commit 0cb859e2bb
3 changed files with 7 additions and 9 deletions

View File

@ -386,8 +386,7 @@ handleEventWrapper
-> Maybe (WidgetResult s e)
handleEventWrapper styleOnMerge pHandler wenv target event inst
| not (_wiVisible inst) = Nothing
-- | not targetValid = Nothing
| targetReached || not targetValid = parentResult
| targetReached || not targetValid = styledParentResult
| styleOnMerge = styledChildrenResult
| otherwise = childrenResult
where
@ -407,7 +406,7 @@ handleEventWrapper styleOnMerge pHandler wenv target event inst
| childrenIgnored || not (_wiEnabled child) = Nothing
| otherwise = widgetHandleEvent childWidget wenv target event child
sHandler _ _ _ _ = mergeParentChildEvts inst pResponse cResponse childIdx
parentResult = handleStyleChange pHandler wenv target event inst
styledParentResult = handleStyleChange pHandler wenv target event inst
childrenResult = mergeParentChildEvts inst pResponse cResponse childIdx
styledChildrenResult = handleStyleChange sHandler wenv target event inst

View File

@ -75,9 +75,9 @@ makeFixedGrid isHorizontal = widget where
foldHelper (currAreas, index) child = (newAreas, newIndex) where
(newIndex, newViewport)
| _wiVisible child = (index + 1, calcViewport index)
| otherwise = (0, def)
| otherwise = (index, def)
newArea = (newViewport, newViewport)
newAreas = currAreas |> newArea
calcViewport i = Rect (cx i) (cy i) cw ch
assignedAreas = fst $ foldl' foldHelper (Seq.empty, 0) vchildren
assignedAreas = fst $ foldl' foldHelper (Seq.empty, 0) children
resized = (inst, assignedAreas)

View File

@ -251,16 +251,15 @@
- Cancelled, not sure if it's an improvement
- Maybe unify criteria on zstack? Top layer config for both focus/click?
- Check getState/merge in all components
- Pending
- Check 1px difference on right side of labels/buttons
- Further textField improvements
- Check displaced textField when adding characters on right align
- Also, when right is reached from left, everything is pushed out of screen
- Double clicking on empty puts the cursor at the end of ghost character
- Right aligned version has cusor overlaid (add caret size to offset in specific cases)
- Make left added char visible
- Check clipboard
- Pending
- Check 1px difference on right side of labels/buttons
- Check Container thing in hover adding columns (not targetValid = Nothing should be removed)
- Add testing
- Delayed until this point to try to settle down interfaces