mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix multiple usability issues in the texture region editor
- Correctly display atlas textures when used by other objects. - Make region handles easier to hit in ninepatchable objects. - Correctly initialize and restore various visual properties. - Improve code quality.
This commit is contained in:
@@ -1507,6 +1507,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
||||
style_theme_preview_bg_tab->set_expand_margin(SIDE_BOTTOM, 2 * EDSCALE);
|
||||
theme->set_stylebox("ThemeEditorPreviewBG", "EditorStyles", style_theme_preview_bg_tab);
|
||||
|
||||
Ref<StyleBoxFlat> style_texture_region_bg = style_tree_bg->duplicate();
|
||||
style_texture_region_bg->set_content_margin_all(0);
|
||||
theme->set_stylebox("TextureRegionPreviewBG", "EditorStyles", style_texture_region_bg);
|
||||
theme->set_stylebox("TextureRegionPreviewFG", "EditorStyles", make_empty_stylebox(0, 0, 0, 0));
|
||||
|
||||
// Separators
|
||||
theme->set_stylebox("separator", "HSeparator", make_line_stylebox(separator_color, MAX(Math::round(EDSCALE), border_width)));
|
||||
theme->set_stylebox("separator", "VSeparator", make_line_stylebox(separator_color, MAX(Math::round(EDSCALE), border_width), 0, 0, true));
|
||||
|
||||
Reference in New Issue
Block a user