Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh scrollbars on style changes. #545

Merged
merged 3 commits into from
May 27, 2022
Merged

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented May 27, 2022

Previously scrollbar visibility was only refreshed when the size of a widget changes.

However, when you modify the CSS with "watch_css" enabled, scrollbar visibility may change despite the size staying the same.

I suspect (but didn't confirm) that scrollbars wouldn't appear if you toggled overflow_x/y using Python at runtime too.

  • Refresh scrollbars on style changes.
  • Instantiate text input visible range to (0,0) by default.
  • Remove debug code.

@darrenburns darrenburns marked this pull request as ready for review May 27, 2022 10:33
visible_content_to_cursor_cell_len=visible_content_to_cursor_cell_len
)
self.log(available_width=available_width)
self.log(cursor_index=self._editor.cursor_index)

Choose a reason for hiding this comment

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

I like the way that code tells a story... A dreadful story of a complex feature development.... 😅

@willmcgugan willmcgugan merged commit d14a759 into css May 27, 2022
@willmcgugan willmcgugan deleted the hot-reload-scrollbars branch May 27, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants