Skip to content

[GUI] Add an option to make the slider respect grabber area's min size #13484

@Delsin-Yu

Description

@Delsin-Yu

Describe the project you are working on

A game DLC (which is a standalone application) with a specific GUI design requirement.

Describe the problem or limitation you are having in your project

When the grabber is set to transparent, the grabber area is clipped out if the computed ratio ≈ 0, whereas the original GUI design requires a minimum grabber area visual size when the ratio is 0.

The original game Slider:

QQ20251027-192658.mp4

When implementing the Slider in Godot (there are also slight changes as Godot prefers selection highlights on the grabber area instead of the slider body):

QQ20251027-193510.mp4

Ideally:

QQ20251027-193734.mp4

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Adds a boolean property to the Slider type named respect_grabber_area_min_size when enabled, which considers the minimum size when drawing the Slider's grabber area.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

If this enhancement will not be used often, can it be worked around with a few lines of script?

This can't be, or is too complicated to implement by script (as it involves many size calculations and value remapping)

Is there a reason why this should be core and not an add-on in the asset library?

As mentioned above, this is a part of the Godot GUI core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions