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

[4.2.1] TabContainer with a large font draws gap between tabs and panels #90332

Closed
sk33z3r opened this issue Apr 7, 2024 · 4 comments
Closed
Labels

Comments

@sk33z3r
Copy link

sk33z3r commented Apr 7, 2024

Tested versions

Reproducible in v4.2.1.stable.flathub [b09f793], another user on Discord also mentions v4.2 but that it didn't occur in a previous version (they did not specify the version number that worked).

Discord forum link for reference: https://discord.com/channels/212250894228652034/1187192074815156364

System information

Arch Linux (Steam Deck), Godot 4.2.1 Stable

Issue description

When I make the font size of a TabContainer's tab buttons large, running the scene draws a gap between the tab buttons and their panel. However, the gap is not present anywhere in the Editor (Theme Editor, Theme Preview, 2D Scene).

I expect the tabs to look uniform whether I am running the scene (using F6) or viewing in the Editor.

Another quirk of the Editor related to this bug: Whenever I reload the Theme Editor Preview, or hide and re-open the Theme Editor panel itself, the tabs are visually separated from the panels for a split second and then they correct themselves and connect to the panels.

Steps to reproduce

  1. Create TabContainer node in any scene
  2. Add some UI Control nodes as children to the TabContainer to get a few tabs
  3. Edit the theme and make the font size for the tab buttons large (in my case 18)
  4. Ensure the content margins are identical across all styleboxes
  • Observe: Tab buttons connect with their panels in the Editor
    tabs_01
    tabs_02
  1. Run the scene (with F6)
  • Observe: Tab buttons are separated from their panels
    tabs_03

Minimal reproduction project (MRP)

The attached MRP has a single scene, built as described in the reproduction:

  • 4 Control nodes as children of a TabContainer
  • All Styles setup the same, with Content Margins 20, 20, 20, 20
  • Font size set to 18

In Editor, tab buttons are connected. Pressing F6, tab buttons are separated. The large the font, the larger the separation seems to be (but may also be dependent on the font geometry?)

TabContainerSpacing.zip

@AeioMuch
Copy link
Contributor

AeioMuch commented Apr 7, 2024

Can reproduce on 4.2.1.stable (tho for me it is also happening in the editor with your MRP)
Can't reproduce on 4.2.2.rc2 or on current master (e5b4ef8) so it got fixed

@sk33z3r
Copy link
Author

sk33z3r commented Apr 7, 2024

@AeioMuch thanks for checking latest versions. I haven't been able to spend time trying to build from source on the Steam Deck, but I had a feeling it might've been an accidental regression that could already be fixed in the next release. I'll try to do that and confirm on my end.

There must be something about my system/gfx driver that causes the Editor to fix itself. I do see the separation in the editor, but only for a split second. No matter since it's probably not an issue anymore.

@sk33z3r sk33z3r changed the title TabContainer with a large font draws gap between tabs and panels [4.2.1] TabContainer with a large font draws gap between tabs and panels Apr 7, 2024
@AeioMuch
Copy link
Contributor

AeioMuch commented Apr 7, 2024

@AeioMuch thanks for checking latest versions. I haven't been able to spend time trying to build from source on the Steam Deck, but I had a feeling it might've been an accidental regression that could already be fixed in the next release. I'll try to do that and confirm on my end.

There must be something about my system/gfx driver that causes the Editor to fix itself. I do see the separation in the editor, but only for a split second. No matter since it's probably not an issue anymore.

In fact it is duplicate of #87511
And got fixed by #88293

@sk33z3r
Copy link
Author

sk33z3r commented Apr 7, 2024

I might not have searched closed issues just because 4.2.1 is latest stable under releases. I'm used to keeping things open until official release, but looks like it is based on when the PR merges here. Will keep in mind for future.

In any case, I can confirm in 4.2.2 RC2 that it is fixed on my side. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants