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

Allow reducing SplitContainer drag bar thickness using the default themes #74691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davthedev
Copy link
Contributor

Using the default themes, the grabber handles of SplitContainers have some white space, making them 8px thick although the actual drawn area is 2px wide only.

Due to a minimum size enforcement based on the grabber graphic size, it is impossible to have a splitter bar thinner
than 8px without providing an alternate grabber graphic.
I discovered this when experimenting with the Godot theme to have thinner separators between panels.

This fixes both the default and editor themes.

The default splitter bar separation remains 8px to avoid breaking changes. But it can now be reduced down to 2px without the need to provide an alternate graphic.

Experimenting with the editor unveiled an issue in the alignment of the T-shaped center grabbers on the 3D editor.
Happens when the view is split in 3 and the separation is something else than 8px.
This commit also fixes this point, simplifying the approach by centering those specific grabber graphics in all cases and adjusting the whitespaces in the graphics.

Compatibility with 3.x: needs adjustement to the 3.x default and editor themes.

The grabber handles of SplitContainers have some white space around,
making them 8px thick although the actual draw area is 2px wide only.

Due to a minimum size enforcement based on the grabber graphic size,
it is impossible to have a splitter thinner than 8px without
providing an alternate grabber graphic. I discovered this when
experimenting with the Godot theme to have thinner separators between
panels.

This fixes both the default and editor themes.

The default splitter bar size is still 8px, making sure nothing is
changed in the default appearance. But it can now be reduced down to
2px without the need to provide an alternate graphic.

Useful in a project where I need very thin separators, and in building a
compact theme for Godot. The minimum grab thickness property already
makes sure it is easy to grab the splitter with the mouse with some
extra pixels of allowance.

Experimenting with the editor unveiled an issue in the alignment of
the T-shaped center grabbers on the 3D editor, when the view is split
in 3. This commit also fixes this point, simplifying the approach by
centering the grabber graphics in all cases.
The whitespace is adjusted on those T-grabbers in consequence.

Compatibility with 3.x: to verify. Needs adjustement to the 3.x default
theme graphics.
@CsloudX
Copy link

CsloudX commented Nov 30, 2023

Need this feature, any update info?

@kitbdev
Copy link
Contributor

kitbdev commented Feb 20, 2024

#87085 changed the editor v and h splitter icons, but not the 3-way or the default theme ones.
I can see the issue you found with the 3-way icon in the current master, it's not aligned.
image

@KoBeWi
Copy link
Member

KoBeWi commented Mar 9, 2024

The edited SVG files are invalid and don't load in editor.
image

@davthedev
Copy link
Contributor Author

I need to have a look as there have been major changes to the theme system since I proposed this feature.

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

Successfully merging this pull request may close these issues.

5 participants