1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

TextureEditorPlugin: Add borders to 3D and Layered editors

This commit is contained in:
BlueCube3310
2025-04-12 12:45:47 +02:00
parent 215acd52e8
commit b0626fefa1
6 changed files with 38 additions and 12 deletions

View File

@@ -96,7 +96,7 @@ void TexturePreview::_notification(int p_what) {
bg_rect->set_color(get_theme_color(SNAME("dark_color_2"), EditorStringName(Editor)));
checkerboard->set_texture(get_editor_theme_icon(SNAME("Checkerboard")));
cached_outline_color = get_theme_color(SNAME("extra_border_color_1"), EditorStringName(Editor));
theme_cache.outline_color = get_theme_color(SNAME("extra_border_color_1"), EditorStringName(Editor));
} break;
}
}
@@ -104,7 +104,7 @@ void TexturePreview::_notification(int p_what) {
void TexturePreview::_draw_outline() {
const float outline_width = Math::round(EDSCALE);
const Rect2 outline_rect = Rect2(Vector2(), outline_overlay->get_size()).grow(outline_width * 0.5);
outline_overlay->draw_rect(outline_rect, cached_outline_color, false, outline_width);
outline_overlay->draw_rect(outline_rect, theme_cache.outline_color, false, outline_width);
}
void TexturePreview::_update_texture_display_ratio() {