summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-12-14 23:35:01 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-12-14 23:35:01 +0100
commit324e02596f3849b0cf9edf39f4addbcf657d4e42 (patch)
tree1cf51500a3b3bb19b1c4bbd256924ce7b3fabf2f /scene
parenta5dcabbbfb2a0b9c6688ea0b6f788491f350f5da (diff)
Lower the maximum StyleBoxFlat corner detail to 20
This value should be sufficient even for very large corner radii. This closes #34354.
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/style_box.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index f26b57b572..d4da98b8a8 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -554,7 +554,7 @@ int StyleBoxFlat::get_aa_size() const {
}
void StyleBoxFlat::set_corner_detail(const int &p_corner_detail) {
- corner_detail = CLAMP(p_corner_detail, 1, 128);
+ corner_detail = CLAMP(p_corner_detail, 1, 20);
emit_changed();
}
int StyleBoxFlat::get_corner_detail() const {
@@ -931,7 +931,7 @@ void StyleBoxFlat::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::INT, "corner_radius_bottom_right", PROPERTY_HINT_RANGE, "0,1024,1"), "set_corner_radius", "get_corner_radius", CORNER_BOTTOM_RIGHT);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "corner_radius_bottom_left", PROPERTY_HINT_RANGE, "0,1024,1"), "set_corner_radius", "get_corner_radius", CORNER_BOTTOM_LEFT);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "corner_detail", PROPERTY_HINT_RANGE, "1,128,1"), "set_corner_detail", "get_corner_detail");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "corner_detail", PROPERTY_HINT_RANGE, "1,20,1"), "set_corner_detail", "get_corner_detail");
ADD_GROUP("Expand Margin", "expand_margin_");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT);