Skip to content

Eliminate un-selectable space between ComboBoxItems#978

Merged
pomianowski merged 3 commits intolepoco:developmentfrom
tmijail:ComboBoxWhitespace
Mar 13, 2024
Merged

Eliminate un-selectable space between ComboBoxItems#978
pomianowski merged 3 commits intolepoco:developmentfrom
tmijail:ComboBoxWhitespace

Conversation

@tmijail
Copy link
Copy Markdown
Contributor

@tmijail tmijail commented Feb 27, 2024

Eliminates blank space that can't be clicked to change the selection of a ComboBox and that doesn't respond when you mouse over it.

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

There's a space between the end of the highlighted ComboBoxItem's Border and the start of the next ComboBoxItem's ContentPresenter that doesn't respond to mouse over and that doesn't affect the ComboBox's value when clicked.

ComboBox.Before.mp4

Issue Number: N/A

What is the new behavior?

After the first commit, the un-selectable space is decreased significantly:

ComboBox.First.Commit.mp4

The second commit eliminates the un-selectable space completely:

ComboBox.Second.Commit.mp4

The downside of this second commit is that it diminishes the customizability of ComboBoxItem. It is possible to increase the effective margin but not decrease it bellow 6,4,6,0 (see the commit description).

Other information

…een ComboBoxItems

Currently, `ComboBoxItem` and `Border` both have margins equal to `ComboBoxItemMargin`. This gives an effective margin of `2 * ComboBoxItemMargin`.

By removing the `ComboBoxItem` margin and setting `Border`'s margin to `2 * ComboBoxItemMargin` we ensure there's no space between `ComboBoxItem`s that can't be clicked to change the selection.

A downside of this is that the customizability of `ComboBoxItem` is diminished. It is possible to increase the margin but not decrease it under `2 * ComboBoxItemMargin`
@tmijail tmijail requested a review from pomianowski as a code owner February 27, 2024 14:46
@pomianowski
Copy link
Copy Markdown
Member

Hey @tmijail, thanks for your contribution ❤️

@pomianowski pomianowski merged commit 95072e4 into lepoco:development Mar 13, 2024
@tmijail tmijail deleted the ComboBoxWhitespace branch March 13, 2024 11:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants