-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Tabs' set_min_width()
doesn't seem to be effective
#31238
Comments
After looking at the source and doing some tests, it seems the way that it was implemented, the minimum width is misleading. The tabs are basically sized big enough to fit the entire text of the tab. Minimum width only starts to take effect when you have so many tabs open. Basically it's the width of the minimized (non-current) tabs when you have a large number of tabs open. This is the code I was looking at: Lines 577 to 596 in 02319dc
I've also noticed that the "Resize if many tabs" option doesn't seem to do anything as it will always resize the tabs regardless of this option. I'm not sure which is better, perhaps renaming the setting to get the point across better? Something like: "Minimized Width w/ Many Tabs" Or maybe change the functionality so that you can adjust the minimum size of the tab the way this issue suggests, which I think would kinda introduce more problems because in the context of few tabs, it is useful... but when you have alot of tabs... the way that it works at the moment seems to be more useful because with few tabs, it's a pretty pointless setting when the editor already adjusts the tab size to fit the full text and a minimum size for a tab with few text takes up screen real estate. |
I think having wider tabs makes for better usability when you only have a few of them, as they're easier to click 🙂 This would make the behavior similar to Web browsers: tabs start fairly wide and become more narrow as you open more of them. |
How much is fairly wide? 15% or 20% of total row width? |
That seems to be roughly it, judging by how Chromium and Firefox do it. |
Looks still valid in 3.2.4 beta2 Maybe we should just remove it. |
Godot version: 7bb2215
OS/device including version: Fedora 30
Issue description: Changing a Tabs node's minimum width using
set_min_width
doesn't seem to do anything, at least in the context of the editor scene tabs. I could confirm that the value is being changed internally by printing it, so the issue must be elsewhere.I also noticed that the setter/getter isn't exposed to GDScript. I tried exposing them out of curiosity, but that didn't solve the issue.
Steps to reproduce: Go to the Editor Settings, change Interface > Scene Tabs > Minimum Width to a value like 200 then restart the editor.
The text was updated successfully, but these errors were encountered: