Merge pull request #69394 from KoBeWi/layin_layout

Display transform properties of contained controls
This commit is contained in:
Rémi Verschelde 2022-11-30 19:08:14 +01:00
commit 4ff610dfaa
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 4 deletions

View File

@ -485,10 +485,10 @@ void Control::_validate_property(PropertyInfo &p_property) const {
} }
} else if (Object::cast_to<Container>(parent_node)) { } else if (Object::cast_to<Container>(parent_node)) {
// If the parent is a container, display only container-related properties. // If the parent is a container, display only container-related properties.
if (p_property.name.begins_with("anchor_") || p_property.name.begins_with("offset_") || p_property.name.begins_with("grow_") || p_property.name == "anchors_preset" || if (p_property.name.begins_with("anchor_") || p_property.name.begins_with("offset_") || p_property.name.begins_with("grow_") || p_property.name == "anchors_preset") {
p_property.name == "position" || p_property.name == "rotation" || p_property.name == "scale" || p_property.name == "size" || p_property.name == "pivot_offset") { p_property.usage ^= PROPERTY_USAGE_DEFAULT;
p_property.usage ^= PROPERTY_USAGE_EDITOR; } else if (p_property.name == "position" || p_property.name == "rotation" || p_property.name == "scale" || p_property.name == "size" || p_property.name == "pivot_offset") {
p_property.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY;
} else if (p_property.name == "layout_mode") { } else if (p_property.name == "layout_mode") {
// Set the layout mode to be disabled with the proper value. // Set the layout mode to be disabled with the proper value.
p_property.hint_string = "Position,Anchors,Container,Uncontrolled"; p_property.hint_string = "Position,Anchors,Container,Uncontrolled";