Skip to content

[JEWEL-1287] LazyTree multi-selection highlight never merges due to conflicting outerPadding and corner-merging logic#3452

Open
fvoidhe wants to merge 1 commit intoJetBrains:masterfrom
fvoidhe:jewel-1287
Open

[JEWEL-1287] LazyTree multi-selection highlight never merges due to conflicting outerPadding and corner-merging logic#3452
fvoidhe wants to merge 1 commit intoJetBrains:masterfrom
fvoidhe:jewel-1287

Conversation

@fvoidhe
Copy link
Copy Markdown

@fvoidhe fvoidhe commented Mar 9, 2026

BasicLazyTree has corner-merging logic that squares off touching edges
between adjacent selected items, intending to produce a continuous
selection block. However, outerPadding = PaddingValues(4.dp) adds 4dp
vertical padding outside the selection background on every row, creating
an 8dp gap between adjacent backgrounds and making the corner-merging
logic permanently ineffective.

Fix by removing the vertical component of outerPadding so adjacent
selection backgrounds can touch and merge as intended.

issue:

https://youtrack.jetbrains.com/issue/JEWEL-1287/LazyTree-multi-selection-highlight-never-merges-due-to-conflicting-outerPadding-and-corner-merging-logic

…onflicting outerPadding and corner-merging logic

BasicLazyTree has corner-merging logic that squares off touching edges
between adjacent selected items, intending to produce a continuous
selection block. However, outerPadding = PaddingValues(4.dp) adds 4dp
vertical padding outside the selection background on every row, creating
an 8dp gap between adjacent backgrounds and making the corner-merging
logic permanently ineffective.

Fix by removing the vertical component of outerPadding so adjacent
selection backgrounds can touch and merge as intended.
Copy link
Copy Markdown
Collaborator

@DanielSouzaBertoldi DanielSouzaBertoldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks for providing a fix + detailed issue in YouTrack! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants