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

Multiple small improvements #160

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mkupchik
Copy link

TextArea::draw() checks there's a selected area before drawing highlighted background. However, there's a duplicate condition m_selection_end != Vector2i(-1) in this check, presumably due to a typo. Let's do this check properly, using the same rules as in TextArea::keyboard_event().

As TextArea::m_selectable field is a bool, it makes sense for TextArea::is_selectable() and TextArea::set_selectable() methods to return and accept bool.

Also it's enough to clear m_tab_offsets once in TabWidgetBase::perform_layout().

As TextArea::m_selectable field is a bool, it makes sense for TextArea::is_selectable() and TextArea::set_selectable() methods to return and accept bool.
It's enough to clear m_tab_offsets once in this context.
TextArea::draw() checks there's a selected area before drawing highlighted background. However, there's a duplicate condition `m_selection_end != Vector2i(-1)` in this check, presumably due to a typo. Let's do this check properly, using the same rules as in TextArea::keyboard_event().
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.

1 participant