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

Buttons and Scrollbar overlapping other Widgets #104

Open
megagrump opened this issue Dec 20, 2021 · 8 comments
Open

Buttons and Scrollbar overlapping other Widgets #104

megagrump opened this issue Dec 20, 2021 · 8 comments
Labels
enhancement New feature or request v1.0.0

Comments

@megagrump
Copy link
Contributor

In the demo, some buttons are overlapping and hiding parts of the text in the Window. The scrollbar is overlapping the button of DropDown list.

image

@flamendless
Copy link
Owner

Thanks for reporting this. I'll look into this as soon as possible

@megagrump
Copy link
Contributor Author

I have noticed that the behavior is not consistent between runs. Sometimes the text is behind the buttons, other times it's not.

@flamendless
Copy link
Owner

I have noticed that the behavior is not consistent between runs. Sometimes the text is behind the buttons, other times it's not.

Hmmm yes you are right. I cant reproduce this issue on my machine 🤔 weird.

In the screenshot above, it is weird that the text is not using the whole line when there is still a lot of space available

@megagrump
Copy link
Contributor Author

If you add love.timer.sleep(.5) to love.draw in the demo, then resize the window, you can watch the text getting wrapped into place over many frames. That's pretty weird and may be the cause of the issue.

@megagrump
Copy link
Contributor Author

megagrump commented Dec 20, 2021

Ooof my apologies, I accidently ran this on an older 11.4 in-development version that had a bug in its text wrapping/rendering code. That was also the reason why the text is so blurry in the screenshot. It's all good!

Scrollbar overlapping widgets and weird deferred text wrapping is still happening though.

@flamendless
Copy link
Owner

The scrollbar behavior is the same as with dearimgui so i think that is okay 🤔 i dont see any issue about that in dearimgui too

@megagrump
Copy link
Contributor Author

megagrump commented Dec 20, 2021

Let's look at this from the usability angle: suppose you have a small widget that is completely obstructed by the scrollbar. You can't click it. Is this a bug or not?

I can't speak to DearIMGUI's bugs, but emulating them seems like a questionable design goal.

@flamendless
Copy link
Owner

Hmm indeed. Slab doesnt have to follow every dearimgui design so yeah we can fix that scrollbar issue but i have some concerns:

  • Only widgets that will be obstructed by the scrollbar should resize the width
  • Text is okay to be obstructed coz I'm thinking that if text will trigger resize, the window will continually resize. Perhaps another approach to this is to break at the nearest word to next line

Anyway these are just what i can think of right now and im probably thinking wrong about the possible cases

@flamendless flamendless added enhancement New feature or request v1.0.0 labels Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.0.0
Projects
None yet
Development

No branches or pull requests

2 participants