[3.x] Oversized Editor Color Picker When Gui/theme/use_hidpi Is Enabled In Project Settings
[3.x] Oversized Editor Color Picker when gui/theme/use_hidpi is enabled in Project Settings
As a Godot developer, you may have encountered issues with the Editor Color Picker when using high DPI settings in your project. In this article, we will explore the problem of an oversized Editor Color Picker when gui/theme/use_hidpi
is enabled in the Project Settings. We will also provide a workaround and discuss the potential fixes for this issue.
We have tested this issue on the following versions of Godot:
- v3.6.stable.official (de2f0f147)
- v3.x (009e0c576babfc40be0d6c7ed43a79de467eed6e)
Our testing environment consists of:
- Godot v3.6.stable
- Windows 11 (build 26100)
- OpenGL 3
- NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 32.0.15.7283)
- AMD Ryzen 5 7640HS w/ Radeon 760M Graphics (12 threads)
When enabling gui/theme/use_hidpi
in the Project Settings, the Editor Color Picker becomes significantly larger. This is unexpected behavior, as gui/theme/use_hidpi
is a project setting that should not directly affect the editor UI itself.
Before and After Images
To illustrate the issue, we have included two images:
As you can see, the Editor Color Picker is much larger when gui/theme/use_hidpi
is enabled.
We have found a workaround for this issue by modifying the color_picker.cpp
file. The modified code is as follows:
if (GLOBAL_GET("gui/theme/use_hidpi")) {
sv_size = Size2(get_constant("sv_width"), get_constant("sv_height")) / 2;
h_width = Size2(get_constant("h_width"), 0) / 2;
}
This workaround adjusts the size of the Editor Color Picker when gui/theme/use_hidpi
is enabled. However, we believe that there is a proper fix for this issue, and we are open to discussing potential solutions.
To reproduce this issue, follow these steps:
- Create a new project in Godot.
- Enable
gui/theme/use_hidpi
in the Project Settings. - Restart the editor.
We have created a minimal reproduction project (MRP) that demonstrates this issue. You can download the MRP from the following link:
In conclusion, we have identified an issue with the Editor Color Picker when gui/theme/use_hidpi
is enabled in the Project Settings. We have provided a workaround and discussed the potential fixes for this issue. We hope that this article has been helpful in understanding and resolving this problem. If you have any further questions or concerns, please do not hesitate to reach out.
[3.x] Oversized Editor Color Picker when gui/theme/use_hidpi is enabled in Project Settings: Q&A
In our previous article, we explored the issue of an oversized Editor Color Picker when gui/theme/use_hidpi
is enabled in the Project Settings. We provided a workaround and discussed the potential fixes for this issue. In this Q&A article, we will answer some frequently asked questions related to this issue.
A: gui/theme/use_hidpi
is a project setting that enables high DPI (dots per inch) rendering for the editor. This setting is intended to improve the visual quality of the editor on high-resolution displays.
A: The Editor Color Picker becomes oversized when gui/theme/use_hidpi
is enabled because the setting affects the scaling of the editor UI. The Color Picker is not designed to scale properly with the high DPI setting, resulting in an oversized appearance.
A: Yes, there are potential fixes for this issue that do not require modifying the color_picker.cpp
file. We are open to discussing and exploring alternative solutions with the Godot community.
A: Yes, the workaround provided in the previous article is a viable solution for this issue. However, we recommend exploring alternative fixes that do not require modifying the color_picker.cpp
file.
A: If you encounter this issue, you can report it to the Godot team by creating a new issue on the Godot GitHub repository. Please provide as much detail as possible, including your Godot version, system information, and steps to reproduce the issue.
A: This issue has been reported on Windows, but it is possible that it may occur on other platforms as well. If you encounter this issue on a different platform, please report it to the Godot team.
A: Yes, the MRP provided in the previous article is a useful tool for testing this issue. You can download the MRP and test it on your system to reproduce the issue.
In conclusion, we hope that this Q&A article has provided helpful information and answers to frequently asked questions related to the issue of an oversized Editor Color Picker when gui/theme/use_hidpi
is enabled in the Project Settings. If you have any further questions or concerns, please do not hesitate to reach out.