Merge pull request #34356 from Calinou/styleboxflat-lower-max-corner-detail

Lower the maximum StyleBoxFlat corner detail to 20
This commit is contained in:
Rémi Verschelde 2019-12-15 11:41:00 +01:00 committed by GitHub
commit 389b7939bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);