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

Item Context Menu - Flexible menu width #1492

Merged
merged 3 commits into from
Jun 24, 2023

Conversation

10Dozen
Copy link
Contributor

@10Dozen 10Dozen commented Aug 6, 2021

When merged this pull request will:

20210806003825_1

@jonpas jonpas added the Bug Fix label Oct 3, 2022
@jonpas jonpas added this to the 3.15.9 milestone Oct 3, 2022
@commy2
Copy link
Contributor

commy2 commented Oct 8, 2022

Why multiply the length by 1.1? Doesn't this mean whitespace grows with text length?

@10Dozen
Copy link
Contributor Author

10Dozen commented Oct 10, 2022

Why multiply the length by 1.1? Doesn't this mean whitespace grows with text length?

I assume it was for some margin for text inside the control, but dumb one, agree.
BIKI:getTextWidth mentions hardcoded 0.008 left and right margins. Guess this may be used instead.

@10Dozen
Copy link
Contributor Author

10Dozen commented Oct 10, 2022

Tried to use only width + margins but as we are using listbox with pictures - we need to add margin for picture as well. I searched for it in defines and config, but didn't get any result.

From tests it should be something like 0.05, but maybe somebody know exact value or different approach?

Changes width calculation to use static margins.
Fixes width calculation was checking for hidden options
@jonpas jonpas merged commit 9fd18c2 into CBATeam:master Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Item Context Menu - Longer Display Names get cut off
4 participants