You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Add Gradient resource preview generator
Co-Authored-By: Haoyu Qiu <timothyqiu32@gmail.com>
This commit is contained in:
committed by
Haoyu Qiu
parent
ab65273087
commit
ea46617f12
@@ -86,7 +86,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
|
||||
if (p_preview.is_valid()) {
|
||||
preview_rect->set_margin(MARGIN_LEFT, assign_button->get_icon()->get_width() + assign_button->get_stylebox("normal")->get_default_margin(MARGIN_LEFT) + get_constant("hseparation", "Button"));
|
||||
|
||||
if (type == "GradientTexture") {
|
||||
if (type == "GradientTexture" || type == "Gradient") {
|
||||
preview_rect->set_stretch_mode(TextureRect::STRETCH_SCALE);
|
||||
assign_button->set_custom_minimum_size(Size2(1, 1));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user