You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add preview Sun and Environment
* Adds both a preview sun and preview environment to the 3D editor. * They are valid as long as a DirectionalLight3D and WorldEnvironment are not in the scene. * If any is added to the scene, the respective preview is disabled. * Changed WorldEnvironment to better handle multiple node versions. * Added a function in SceneTree to get the first node in a group. * Fixed button minimum size to also consider font height if no text is there, this broke with the TextSever PR.
This commit is contained in:
@@ -56,6 +56,11 @@ Size2 Button::get_minimum_size() const {
|
||||
}
|
||||
}
|
||||
|
||||
Ref<Font> font = get_theme_font("font");
|
||||
float font_height = font->get_height(get_theme_font_size("font_size"));
|
||||
|
||||
minsize.height = MAX(font_height, minsize.height);
|
||||
|
||||
return get_theme_stylebox("normal")->get_minimum_size() + minsize;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user