godotengine / godotengine/godot
Overriding hover_pressed state of the button in custom project theme affects the editor theme
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in: v3.6.stable.official [de2f0f147]
- Not reproducible in: v3.5.3.stable.official [6c814135b] and v4.3.stable.official [77dcf97d8]
### System information
Windows 11 - Godot v3.6.stable.official [de2f0f147] - GLES2 and GLES3 - dedicated NVIDIA GeForce GTX 1650 (Nvidia, 565.90) - Intel Core i5-9300HF CPU @ 2.40GHz (8 Threads)
### Issue description
By creating a GUI theme with the overridden hover_pressed state of the button (in Styleboxes) and assigning it in the project settings along the "gui/theme/custom" path, it also overrides this button state in the editor theme.
An example is shown in the screenshot below. Here I replaced the hover_pressed state of the button in Styleboxes, assigned it in the project settings, rebooted and moved the cursor to the enabled switch.

It is expected that the theme will only affect the GUI inside the project, and the editor theme should be redefined only through the editor settings along the "interface/theme/custom_theme" path.
### Steps to reproduce
1. Create a Theme resource in the project folder
2. Add the Button type for override
3. Go to the Styleboxes section and add the "hover_pressed" state
4. Create any new style for "hover_pressed" (I created StyleBoxFlat with red BG Color)
5. Save the style with the Save button in the theme editor
6. Go to the Project > Project Settings
7. Assign the created theme in the "gui/theme/custom" parameter
8. Restart the editor
9. Open the Theme Editor and hover over the "Show Default" switch or click on the Scene/Project/Debug buttons in the upper panel
### Minimal reproduction project (MRP)
[hover_pressed_mrp.zip](https://github.com/user-attachments/files/17270905/hover_pressed_mrp.zip)
Contributor guide
Research direction
Start by reproducing the issue with the linked minimal reproduction project, focusing on the project setting gui/theme/custom and the editor setting interface/theme/custom_theme. Trace how the custom project theme is applied after restarting the editor, and verify that changing the project theme no longer changes editor controls while the project UI still uses it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, godot
- Domain
- desktop-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100