godotengine / godotengine/godot

Rounded Progressbar does not behave well for values below the corner radius

Open
#87,690 7 comments 5 reactions 0 assignees View on GitHub
bug discussion topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.2.1.stable.official [b09f793f5]

### System information

Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.4633) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)

### Issue description

The progressbar with a StyleBoxFlat is distorted for values below the corner radius.
![image](https://github.com/godotengine/godot/assets/10883690/c00bf392-55fd-4bb3-9515-5ff5c8fe824b)
For larger values it is ok again
![image](https://github.com/godotengine/godot/assets/10883690/7ba3fd4b-7f56-4a95-8395-be7e5b46fc3e)

The stylebox needs to be cut off at that value, instead of being distorted.

Related to https://github.com/godotengine/godot/issues/44015, but with StyleBoxTexture.

### Steps to reproduce

Create Progressbar with a StyleBox who has larger rounded corners, to make it visible.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a ProgressBar using a StyleBoxFlat with large rounded corners, then inspect the ProgressBar and StyleBoxFlat rendering paths. Done means values below the corner radius are clipped cleanly instead of distorted, while larger values retain their existing appearance.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.