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

MessageBox expands if there are more than one button #99

Closed
maw3193 opened this issue Sep 16, 2021 · 4 comments
Closed

MessageBox expands if there are more than one button #99

maw3193 opened this issue Sep 16, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@maw3193
Copy link

maw3193 commented Sep 16, 2021

Hi, I'm having a bit of a problem when I try to use the FileDialog to in "savefile" mode - the confirm overwrite dialog expands until it goes off the edge of the screen.
From trying to find the root cause, it seems to be every MessageBox, and it seems to only happen when the buttons are aligned to the bottom-right.

The specific issue is:
When I create a MessageBox with more than one button, the messagebox constantly expands, moving the buttons off the side of the screen (as seen in the below gif)
expand

I see this every time when I run love on https://github.com/maw3193/slab-test/tree/messagebox-multi-button.

This is on Ubuntu 21.04, running love 11.3, with Slab master as of September 14th (commit 938aea0)

@flamendless
Copy link
Owner

Hi. Thanks for reporting this. I'll get this fixed as soon as i can.

@flamendless flamendless added the bug Something isn't working label Sep 16, 2021
@flamendless
Copy link
Owner

Hi, this has been fixed now in the latest commit @maw3193

Please let me know if the patch breaks other things.

@maw3193
Copy link
Author

maw3193 commented Sep 17, 2021

That works, thanks!

I'll have a look and see if anything else crops up.

@flamendless
Copy link
Owner

flamendless commented Sep 18, 2021

It seems that there is regression with the patch. A simple

	Slab.BeginWindow("test", {
		Title = "Test",
	})
	Slab.Text("test")
	Slab.Button("test")
	Slab.Button("test test test")
	Slab.EndWindow()

will show the problem with the fix. If button width exceeds the window's width, the window's width should stretch as well to compensate for the space.

EDIT:
latest patch should fix this regression

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

2 participants