Skip to content

Fix combobox popup menu#114

Open
kunitoki wants to merge 2 commits into
mainfrom
dev/fix_combobox_popup_menu
Open

Fix combobox popup menu#114
kunitoki wants to merge 2 commits into
mainfrom
dev/fix_combobox_popup_menu

Conversation

@kunitoki
Copy link
Copy Markdown
Owner

@kunitoki kunitoki commented Jun 5, 2026

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
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.61%. Comparing base (b0e166d) to head (9d9bbc1).
⚠️ Report is 2 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.50%   78.61%   +0.11%     
==========================================
  Files         605      605              
  Lines       60548    60566      +18     
==========================================
+ Hits        47531    47614      +83     
+ Misses      13017    12952      -65     
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 13 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 b0e166d...9d9bbc1. 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.

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