Skip to content

Fix combobox popup menu#114

Merged
kunitoki merged 3 commits into
mainfrom
dev/fix_combobox_popup_menu
Jun 9, 2026
Merged

Fix combobox popup menu#114
kunitoki merged 3 commits into
mainfrom
dev/fix_combobox_popup_menu

Conversation

@kunitoki

@kunitoki kunitoki commented Jun 5, 2026

Copy link
Copy Markdown
Owner

This pull request introduces improvements to the ComboBox widget's popup menu interaction logic and enhances the text layout behavior in the Label widget. The main focus is on preventing the popup menu from immediately reopening after dismissal due to a mouse click, ensuring a smoother user experience. Additionally, the pull request includes a test to verify the new popup behavior and refines how text is rendered in labels to better fit available space.

ComboBox popup interaction improvements

  • Added logic in ComboBox to prevent the popup menu from reopening immediately after it is dismissed by a mouse click, using new state flags (ignoreMouseDownAfterPopupDismissal, dismissingPopupFromMouseDown) and handling within mouseDown and showPopup methods. [1] [2] [3]
  • Added a unit test PopupDismissalClickDoesNotReopenPopup to verify that a click used to dismiss the popup does not immediately reopen it, ensuring correct behavior.

Label text layout improvements

  • Updated the Label::prepareText method to use the provided font or fallback to the default, and to dynamically adjust the font size so that text fits within the available width, preventing overflow and improving appearance. Also changed text overflow handling from ellipsis to visible.

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.61%. Comparing base (1a531a6) to head (c1deedd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
modules/yup_gui/widgets/yup_ComboBox.cpp 84.61% 2 Missing ⚠️
modules/yup_gui/widgets/yup_Label.cpp 90.90% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   78.49%   78.61%   +0.12%     
==========================================
  Files         605      605              
  Lines       60548    60566      +18     
==========================================
+ Hits        47525    47615      +90     
+ Misses      13023    12951      -72     
Files with missing lines Coverage Δ
modules/yup_gui/widgets/yup_ComboBox.h 80.00% <ø> (ø)
modules/yup_gui/widgets/yup_Label.cpp 86.88% <90.90%> (+1.17%) ⬆️
modules/yup_gui/widgets/yup_ComboBox.cpp 89.70% <84.61%> (+14.90%) ⬆️

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a572487...c1deedd. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kunitoki kunitoki merged commit 7cfe114 into main Jun 9, 2026
40 checks passed
@kunitoki kunitoki deleted the dev/fix_combobox_popup_menu branch June 9, 2026 18:47
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