Scrollbars autohide, select fix for reselecting current item closing popup#25057
Scrollbars autohide, select fix for reselecting current item closing popup#25057gagnus wants to merge 2 commits into
Conversation
| && let Ok((gutter, mut node)) = q_gutters.get_mut(child_of.parent()) | ||
| { | ||
| let padding = if overflows { gutter.0 } else { Val::ZERO }; | ||
| if node.padding.right != padding { |
There was a problem hiding this comment.
I would suggest adding a clarifying note here, as this makes certain assumptions about the layout structure of the parent container - those assumptions are true in the case of feathers, but may not be true for non-feathers widgets generally.
For example, a headless scrollbar can be placed in a grid, a flexbox, or it can float on top as a separate layer. For a floating scrollbar, altering the padding of the parent wouldn't be the right move.
Also, the above code appears to handle both horizontal and vertical scrollbars, but I would think that adjusting the right padding would only work for vertical scrollbars.
There was a problem hiding this comment.
good spot, thanks. will add comment to make clear ScrollbarGutter is just for padding based ones and fix horizontal.
… also added comment on gutter to make clear its only for padding based scrollbars



Objective / Solution
Solution
cargo run --example feathers_gallery --features bevy_feathersShowcase
Select where all items fit:
Select where they don't: