godotengine / godotengine/godot
Rounded Progressbar does not behave well for values below the corner radius
- 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.

For larger values it is ok again

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
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