godotengine / godotengine/godot

RichTextLabel StyleBox shadow is not fully displayed due to Clip Contents being enabled by default

Open
#94,940 5 comments 0 reactions 0 assignees View on GitHub
bug confirmed topic:2d topic:gui topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Doesn't work in 4.2 or 4.3 rc

### System information

Windows 11

### Issue description

The RichTextLabel shadow gets cut off by its own size.

![Screenshot 2024-07-29 224328](https://github.com/user-attachments/assets/0c0df3de-0432-4609-93f7-069950a5956b)
![Screenshot 2024-07-29 224407](https://github.com/user-attachments/assets/be1840af-d90f-4110-9fe7-905d96c2cb23)

### Steps to reproduce

If you create a Rich Text label and then set a styleBoxFlat style to it, and then add a shadow and offset it, the shadow gets clipped by the textbox's bounds. This doesn't happen with labels or panels.

### Minimal reproduction project (MRP)

self, explanatory

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a RichTextLabel using a StyleBoxFlat shadow and offset, then compare its clipping with Label and Panel as described. Confirm that the shadow is fully displayed outside the textbox bounds without changing the intended RichTextLabel content area.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.