summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/physics_body.h2
-rw-r--r--scene/debugger/script_debugger_remote.cpp2
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--scene/gui/dialogs.cpp1
-rw-r--r--scene/gui/item_list.cpp8
-rw-r--r--scene/gui/option_button.cpp14
-rw-r--r--scene/gui/scroll_container.cpp17
-rw-r--r--scene/gui/scroll_container.h4
-rw-r--r--scene/gui/text_edit.cpp1
-rwxr-xr-xscene/main/timer.cpp2
-rw-r--r--scene/resources/default_theme/default_theme.cpp8
-rw-r--r--scene/resources/style_box.cpp79
12 files changed, 86 insertions, 54 deletions
diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h
index de1944bdf0..b208baf235 100644
--- a/scene/3d/physics_body.h
+++ b/scene/3d/physics_body.h
@@ -638,7 +638,7 @@ public:
void apply_central_impulse(const Vector3 &p_impulse);
void apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse);
-
+
PhysicalBone();
~PhysicalBone();
diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp
index c3c6a088cb..1b37a7dbdb 100644
--- a/scene/debugger/script_debugger_remote.cpp
+++ b/scene/debugger/script_debugger_remote.cpp
@@ -1257,7 +1257,7 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() :
scene_tree(NULL) {
packet_peer_stream->set_stream_peer(tcp_client);
- packet_peer_stream->set_output_buffer_max_size(1024 * 1024 * 8); //8mb should be way more than enough
+ packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator.
phl.printfunc = _print_handler;
phl.userdata = this;
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index ccc658b0aa..92e740889d 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2286,7 +2286,7 @@ void Control::set_theme(const Ref<Theme> &p_theme) {
}
if (data.theme.is_valid()) {
- data.theme->connect("changed", this, "_theme_changed");
+ data.theme->connect("changed", this, "_theme_changed", varray(), CONNECT_DEFERRED);
}
}
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index c7db852f90..24ba0c3e6d 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -35,6 +35,7 @@
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "scene/main/viewport.h" // Only used to check for more modals when dimming the editor.
#endif
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 20bbcbde80..91da395368 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1456,7 +1456,7 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "icon"), &ItemList::set_item_icon);
ClassDB::bind_method(D_METHOD("get_item_icon", "idx"), &ItemList::get_item_icon);
- ClassDB::bind_method(D_METHOD("set_item_icon_transposed", "idx", "rect"), &ItemList::set_item_icon_transposed);
+ ClassDB::bind_method(D_METHOD("set_item_icon_transposed", "idx", "transposed"), &ItemList::set_item_icon_transposed);
ClassDB::bind_method(D_METHOD("is_item_icon_transposed", "idx"), &ItemList::is_item_icon_transposed);
ClassDB::bind_method(D_METHOD("set_item_icon_region", "idx", "rect"), &ItemList::set_item_icon_region);
@@ -1553,12 +1553,12 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Multi"), "set_select_mode", "get_select_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_reselect"), "set_allow_reselect", "get_allow_reselect");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "max_text_lines"), "set_max_text_lines", "get_max_text_lines");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_text_lines", PROPERTY_HINT_RANGE, "1,10,1,or_greater"), "set_max_text_lines", "get_max_text_lines");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_height"), "set_auto_height", "has_auto_height");
ADD_GROUP("Columns", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "max_columns"), "set_max_columns", "get_max_columns");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_columns", PROPERTY_HINT_RANGE, "0,10,1,or_greater"), "set_max_columns", "get_max_columns");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "same_column_width"), "set_same_column_width", "is_same_column_width");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_column_width"), "set_fixed_column_width", "get_fixed_column_width");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_column_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_fixed_column_width", "get_fixed_column_width");
ADD_GROUP("Icon", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale");
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index de8df4215d..f9214c3b1e 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -35,8 +35,9 @@ Size2 OptionButton::get_minimum_size() const {
Size2 minsize = Button::get_minimum_size();
- if (has_icon("arrow"))
+ if (has_icon("arrow")) {
minsize.width += Control::get_icon("arrow")->get_width() + get_constant("hseparation");
+ }
return minsize;
}
@@ -73,6 +74,12 @@ void OptionButton::_notification(int p_what) {
Point2 ofs(size.width - arrow->get_width() - get_constant("arrow_margin"), int(Math::abs((size.height - arrow->get_height()) / 2)));
arrow->draw(ci, ofs, clr);
} break;
+ case NOTIFICATION_THEME_CHANGED: {
+
+ if (has_icon("arrow")) {
+ _set_internal_margin(MARGIN_RIGHT, Control::get_icon("arrow")->get_width());
+ }
+ } break;
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible_in_tree()) {
@@ -327,7 +334,7 @@ void OptionButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_items"), &OptionButton::_get_items);
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items");
- // "selected" property must come after "items", otherwise GH-10213 occurs
+ // "selected" property must come after "items", otherwise GH-10213 occurs.
ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected");
ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("item_focused", PropertyInfo(Variant::INT, "id")));
@@ -339,6 +346,9 @@ OptionButton::OptionButton() {
set_toggle_mode(true);
set_text_align(ALIGN_LEFT);
set_action_mode(ACTION_MODE_BUTTON_PRESS);
+ if (has_icon("arrow")) {
+ _set_internal_margin(MARGIN_RIGHT, Control::get_icon("arrow")->get_width());
+ }
popup = memnew(PopupMenu);
popup->hide();
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index cb9ae875b7..169e1db663 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -235,6 +235,10 @@ void ScrollContainer::_update_scrollbar_position() {
void ScrollContainer::_ensure_focused_visible(Control *p_control) {
+ if (!follow_focus) {
+ return;
+ }
+
if (is_a_parent_of(p_control)) {
Rect2 global_rect = get_global_rect();
Rect2 other_rect = p_control->get_global_rect();
@@ -506,6 +510,14 @@ void ScrollContainer::set_deadzone(int p_deadzone) {
deadzone = p_deadzone;
}
+bool ScrollContainer::is_following_focus() const {
+ return follow_focus;
+}
+
+void ScrollContainer::set_follow_focus(bool p_follow) {
+ follow_focus = p_follow;
+}
+
String ScrollContainer::get_configuration_warning() const {
int found = 0;
@@ -555,6 +567,8 @@ void ScrollContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_v_scroll"), &ScrollContainer::get_v_scroll);
ClassDB::bind_method(D_METHOD("set_deadzone", "deadzone"), &ScrollContainer::set_deadzone);
ClassDB::bind_method(D_METHOD("get_deadzone"), &ScrollContainer::get_deadzone);
+ ClassDB::bind_method(D_METHOD("set_follow_focus", "enabled"), &ScrollContainer::set_follow_focus);
+ ClassDB::bind_method(D_METHOD("is_following_focus"), &ScrollContainer::is_following_focus);
ClassDB::bind_method(D_METHOD("get_h_scrollbar"), &ScrollContainer::get_h_scrollbar);
ClassDB::bind_method(D_METHOD("get_v_scrollbar"), &ScrollContainer::get_v_scrollbar);
@@ -562,6 +576,8 @@ void ScrollContainer::_bind_methods() {
ADD_SIGNAL(MethodInfo("scroll_started"));
ADD_SIGNAL(MethodInfo("scroll_ended"));
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_focus"), "set_follow_focus", "is_following_focus");
+
ADD_GROUP("Scroll", "scroll_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_horizontal_enabled"), "set_enable_h_scroll", "is_h_scroll_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll");
@@ -593,6 +609,7 @@ ScrollContainer::ScrollContainer() {
scroll_v = true;
deadzone = GLOBAL_GET("gui/common/default_scroll_deadzone");
+ follow_focus = false;
set_clip_contents(true);
};
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index 1d247f14c6..959bc43870 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -62,6 +62,7 @@ class ScrollContainer : public Container {
bool scroll_v;
int deadzone;
+ bool follow_focus;
void _cancel_drag();
@@ -93,6 +94,9 @@ public:
int get_deadzone() const;
void set_deadzone(int p_deadzone);
+ bool is_following_focus() const;
+ void set_follow_focus(bool p_follow);
+
HScrollBar *get_h_scrollbar();
VScrollBar *get_v_scrollbar();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 9bcacd6ee3..2c4c7bdebe 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1946,6 +1946,7 @@ void TextEdit::indent_right() {
// Ignore if the cursor is not past the first column.
if (is_selection_active() && get_selection_to_column() == 0) {
+ selection_offset = 0;
end_line--;
}
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index da96c6e89c..db504a22c7 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -206,7 +206,7 @@ void Timer::_bind_methods() {
ADD_SIGNAL(MethodInfo("timeout"));
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_timer_process_mode", "get_timer_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.01,4096,0.01"), "set_wait_time", "get_wait_time");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused", PROPERTY_HINT_NONE, "", 0), "set_paused", "is_paused");
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index c67e5a928c..7bbe2a7d09 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -266,10 +266,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// OptionButton
- Ref<StyleBox> sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 21, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_pressed = sb_expand(make_stylebox(option_button_pressed_png, 4, 4, 21, 4, 6, 3, 21, 3), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_hover = sb_expand(make_stylebox(option_button_hover_png, 4, 4, 21, 4, 6, 2, 21, 2), 2, 2, 2, 2);
- Ref<StyleBox> sb_optbutton_disabled = sb_expand(make_stylebox(option_button_disabled_png, 4, 4, 21, 4, 6, 2, 21, 2), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_pressed = sb_expand(make_stylebox(option_button_pressed_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_hover = sb_expand(make_stylebox(option_button_hover_png, 4, 4, 21, 4, 6, 2, 9, 2), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_disabled = sb_expand(make_stylebox(option_button_disabled_png, 4, 4, 21, 4, 6, 2, 9, 2), 2, 2, 2, 2);
Ref<StyleBox> sb_optbutton_focus = sb_expand(make_stylebox(button_focus_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
theme->set_stylebox("normal", "OptionButton", sb_optbutton_normal);
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index d4da98b8a8..e0286b9238 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -590,8 +590,8 @@ inline void set_inner_corner_radius(const Rect2 style_rect, const Rect2 inner_re
inner_corner_radius[3] = MAX(corner_radius[3] - rad, 0);
}
-inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color> &colors, const Rect2 style_rect, const int corner_radius[4],
- const Rect2 ring_rect, const int border_width[4], const Color &inner_color, const Color &outer_color, const int corner_detail, const bool fill_center = false) {
+inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color> &colors, const Rect2 &style_rect, const int corner_radius[4],
+ const Rect2 &ring_rect, const Rect2 &inner_rect, const Color &inner_color, const Color &outer_color, const int corner_detail, const bool fill_center = false) {
int vert_offset = verts.size();
if (!vert_offset) {
@@ -610,9 +610,6 @@ inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color
outer_points.push_back(ring_rect.position + ring_rect.size - Vector2(ring_corner_radius[2], ring_corner_radius[2])); //br
outer_points.push_back(Point2(ring_rect.position.x + ring_corner_radius[3], ring_rect.position.y + ring_rect.size.y - ring_corner_radius[3])); //bl
- Rect2 inner_rect;
- inner_rect = ring_rect.grow_individual(-border_width[MARGIN_LEFT], -border_width[MARGIN_TOP], -border_width[MARGIN_RIGHT], -border_width[MARGIN_BOTTOM]);
-
int inner_corner_radius[4];
set_inner_corner_radius(style_rect, inner_rect, corner_radius, inner_corner_radius);
@@ -723,20 +720,11 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
bool rounded_corners = (corner_radius[0] > 0) || (corner_radius[1] > 0) || (corner_radius[2] > 0) || (corner_radius[3] > 0);
bool aa_on = rounded_corners && anti_aliased;
- Color border_color_alpha = Color(border_color.r, border_color.g, border_color.b, 0);
-
bool blend_on = blend_border && draw_border;
- Rect2 border_style_rect = style_rect;
- if (aa_on && !blend_on) {
- float aa_size_grow = 0.5 * ((aa_size + 1) / 2);
- style_rect = style_rect.grow(-aa_size_grow);
- for (int i = 0; i < 4; i++) {
- if (border_width[i] > 0) {
- border_style_rect = border_style_rect.grow_margin((Margin)i, -aa_size_grow);
- }
- }
- }
+ Color border_color_alpha = Color(border_color.r, border_color.g, border_color.b, 0);
+ Color border_color_blend = (draw_center ? bg_color : border_color_alpha);
+ Color border_color_inner = blend_on ? border_color_blend : border_color;
//adapt borders (prevent weird overlapping/glitchy drawings)
int width = MAX(style_rect.size.width, 0);
@@ -754,6 +742,16 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
Rect2 infill_rect = style_rect.grow_individual(-adapted_border[MARGIN_LEFT], -adapted_border[MARGIN_TOP], -adapted_border[MARGIN_RIGHT], -adapted_border[MARGIN_BOTTOM]);
+ Rect2 border_style_rect = style_rect;
+ if (aa_on) {
+ float aa_size_grow = 0.5 * ((aa_size + 1) / 2);
+ for (int i = 0; i < 4; i++) {
+ if (border_width[i] > 0) {
+ border_style_rect = border_style_rect.grow_margin((Margin)i, -aa_size_grow);
+ }
+ }
+ }
+
Vector<Point2> verts;
Vector<int> indices;
Vector<Color> colors;
@@ -761,8 +759,6 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
//DRAW SHADOW
if (draw_shadow) {
- int shadow_width[4] = { shadow_size, shadow_size, shadow_size, shadow_size };
-
Rect2 shadow_inner_rect = style_rect;
shadow_inner_rect.position += shadow_offset;
@@ -772,59 +768,65 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
Color shadow_color_transparent = Color(shadow_color.r, shadow_color.g, shadow_color.b, 0);
draw_ring(verts, indices, colors, shadow_inner_rect, adapted_corner,
- shadow_rect, shadow_width, shadow_color, shadow_color_transparent, corner_detail);
+ shadow_rect, shadow_inner_rect, shadow_color, shadow_color_transparent, corner_detail);
if (draw_center) {
- int no_border[4] = { 0, 0, 0, 0 };
draw_ring(verts, indices, colors, shadow_inner_rect, adapted_corner,
- shadow_inner_rect, no_border, shadow_color, shadow_color, corner_detail, true);
+ shadow_inner_rect, shadow_inner_rect, shadow_color, shadow_color, corner_detail, true);
}
}
//DRAW border
if (draw_border) {
draw_ring(verts, indices, colors, border_style_rect, adapted_corner,
- border_style_rect, adapted_border, blend_on ? (draw_center ? bg_color : border_color_alpha) : border_color, border_color, corner_detail);
+ border_style_rect, infill_rect, border_color_inner, border_color, corner_detail);
}
//DRAW INFILL
- if (draw_center) {
- int no_border[4] = { 0, 0, 0, 0 };
- draw_ring(verts, indices, colors, style_rect, adapted_corner,
- infill_rect, no_border, bg_color, bg_color, corner_detail, true);
+ if (draw_center && (!aa_on || blend_on || !draw_border)) {
+ draw_ring(verts, indices, colors, border_style_rect, adapted_corner,
+ infill_rect, infill_rect, bg_color, bg_color, corner_detail, true);
}
if (aa_on) {
- Rect2 border_inner_rect = infill_rect;
+ float aa_size_grow = 0.5 * ((aa_size + 1) / 2);
int aa_border_width[4];
int aa_fill_width[4];
if (draw_border) {
- border_inner_rect = border_style_rect.grow_individual(-adapted_border[MARGIN_LEFT], -adapted_border[MARGIN_TOP], -adapted_border[MARGIN_RIGHT], -adapted_border[MARGIN_BOTTOM]);
for (int i = 0; i < 4; i++) {
if (border_width[i] > 0) {
- aa_border_width[i] = aa_size;
+ aa_border_width[i] = aa_size_grow;
aa_fill_width[i] = 0;
} else {
aa_border_width[i] = 0;
- aa_fill_width[i] = aa_size;
+ aa_fill_width[i] = aa_size_grow;
}
}
} else {
for (int i = 0; i < 4; i++) {
- aa_fill_width[i] = aa_size;
+ aa_fill_width[i] = aa_size_grow;
}
}
+ Rect2 infill_inner_rect = infill_rect.grow_individual(-aa_border_width[MARGIN_LEFT], -aa_border_width[MARGIN_TOP],
+ -aa_border_width[MARGIN_RIGHT], -aa_border_width[MARGIN_BOTTOM]);
+
if (draw_center) {
- if (!draw_border || !blend_on) {
- Rect2 aa_rect = infill_rect.grow_individual(aa_fill_width[MARGIN_LEFT], aa_fill_width[MARGIN_TOP],
+ if (!blend_on && draw_border) {
+ //DRAW INFILL WITHIN BORDER AA
+ draw_ring(verts, indices, colors, border_style_rect, adapted_corner,
+ infill_inner_rect, infill_inner_rect, bg_color, bg_color, corner_detail, true);
+ }
+
+ if (!blend_on || !draw_border) {
+ Rect2 infill_aa_rect = infill_rect.grow_individual(aa_fill_width[MARGIN_LEFT], aa_fill_width[MARGIN_TOP],
aa_fill_width[MARGIN_RIGHT], aa_fill_width[MARGIN_BOTTOM]);
Color alpha_bg = Color(bg_color.r, bg_color.g, bg_color.b, 0);
//INFILL AA
draw_ring(verts, indices, colors, style_rect, adapted_corner,
- aa_rect, aa_fill_width, bg_color, alpha_bg, corner_detail);
+ infill_aa_rect, infill_rect, bg_color, alpha_bg, corner_detail);
}
}
@@ -832,15 +834,12 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
if (!blend_on) {
//DRAW INNER BORDER AA
draw_ring(verts, indices, colors, border_style_rect, adapted_corner,
- border_inner_rect, aa_border_width, border_color_alpha, border_color, corner_detail);
+ infill_rect, infill_inner_rect, border_color_blend, border_color, corner_detail);
}
- Rect2 aa_rect = border_style_rect.grow_individual(aa_border_width[MARGIN_LEFT], aa_border_width[MARGIN_TOP],
- aa_border_width[MARGIN_RIGHT], aa_border_width[MARGIN_BOTTOM]);
-
//DRAW OUTER BORDER AA
draw_ring(verts, indices, colors, border_style_rect, adapted_corner,
- aa_rect, aa_border_width, border_color, border_color_alpha, corner_detail);
+ style_rect, border_style_rect, border_color, border_color_alpha, corner_detail);
}
}