Skip to content

Fix ScrollComponent not handling LifeCycle::HotChanged.#2343

Merged
xStrom merged 2 commits intolinebender:masterfrom
xStrom:scroll_leave
Jan 26, 2023
Merged

Fix ScrollComponent not handling LifeCycle::HotChanged.#2343
xStrom merged 2 commits intolinebender:masterfrom
xStrom:scroll_leave

Conversation

@xStrom
Copy link
Member

@xStrom xStrom commented Jan 24, 2023

This PR adds LifeCycle::HotChanged handling to ScrollComponent which allows it to hide the scroll bars when the widget loses hot state but doesn't receive any MouseMove events that would confirm this. This bug was hidden on GTK thanks to #552 but revealed again due to #2324.

The fix can be seen in action with the scroll_colors example as seen below:

before_leave
after_leave

@xStrom xStrom added widget concerns a particular widget S-needs-review waits for review labels Jan 24, 2023
@xStrom xStrom added this to the Release 0.8 milestone Jan 24, 2023
Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

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

Looks good to me. I just confirmed that the scroll bar gets stuck for the old versions, but not for your patch.

Copy link
Member

@jneem jneem left a comment

Choose a reason for hiding this comment

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

Didn't test it personally, but it looks fine.

@longmathemagician longmathemagician removed the S-needs-review waits for review label Jan 26, 2023
@xStrom xStrom merged commit 9050ac3 into linebender:master Jan 26, 2023
@xStrom xStrom deleted the scroll_leave branch January 26, 2023 23:13
xStrom added a commit to xStrom/druid that referenced this pull request Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

widget concerns a particular widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants