diff options
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 9541033fe8..880e51660b 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2229,8 +2229,8 @@ void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); - spin[i]->set_suffix(p_suffix); } + spin[3]->set_suffix(p_suffix); } EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) { @@ -2322,6 +2322,8 @@ void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); + // Quaternion is inherently unitless, however someone may want to use it as + // a generic way to store 4 values, so we'll still respect the suffix. spin[i]->set_suffix(p_suffix); } } @@ -2506,7 +2508,9 @@ void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); - spin[i]->set_suffix(p_suffix); + if (i % 3 == 2) { + spin[i]->set_suffix(p_suffix); + } } } @@ -2596,6 +2600,8 @@ void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); + // Basis is inherently unitless, however someone may want to use it as + // a generic way to store 9 values, so we'll still respect the suffix. spin[i]->set_suffix(p_suffix); } } @@ -2692,7 +2698,9 @@ void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); - spin[i]->set_suffix(p_suffix); + if (i % 4 == 3) { + spin[i]->set_suffix(p_suffix); + } } } @@ -2752,7 +2760,13 @@ void EditorPropertyColor::_picker_opening() { last_color = picker->get_pick_color(); } -void EditorPropertyColor::_bind_methods() { +void EditorPropertyColor::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case NOTIFICATION_THEME_CHANGED: { + picker->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor")))); + } break; + } } void EditorPropertyColor::update_property() { @@ -3346,7 +3360,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Varian } struct EditorPropertyRangeHint { - bool angle_in_degrees = false; bool greater = true; bool lesser = true; double min = -99999.0; |