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

Dialog boxes may have infinite/very large width #11

Open
Rangi42 opened this issue Jun 23, 2020 · 2 comments
Open

Dialog boxes may have infinite/very large width #11

Rangi42 opened this issue Jun 23, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Rangi42
Copy link
Owner

Rangi42 commented Jun 23, 2020

Maximized window, single monitor:

image

@Rangi42
Copy link
Owner Author

Rangi42 commented Jun 23, 2020

Might be fixed as of 3.2.0:

image

@Rangi42
Copy link
Owner Author

Rangi42 commented Jun 25, 2020

This code in Modal_Dialog::refresh may be responsible:

	int bwd = (_icon_type == Icon::NO_ICON ? 0 : 60) + 20;
	fl_font(_heading->labelfont(), _heading->labelsize());
	int hw = _max_w - bwd, hh = 0;
	fl_measure(_heading->label(), hw, hh);
	fl_font(_body->labelfont(), _body->labelsize());
	int bw = _max_w - bwd, bh = 0;
	fl_measure(_body->label(), bw, bh);
	int w = MAX(MAX(bw, hw) + bwd + OS_FONT_SIZE, _min_w), h = 10;

fl_measure may be returning very high values.

@Rangi42 Rangi42 added the bug Something isn't working label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant