Merge pull request #105994 from syntaxerror247/split_container

Add option for a touch-friendly drag handle in `SplitContainer`
This commit is contained in:
Rémi Verschelde 2025-06-05 13:11:14 +02:00
commit b25f609eed
No known key found for this signature in database
GPG key ID: C3336907360768E1
15 changed files with 157 additions and 17 deletions

View file

@ -592,19 +592,19 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Touchscreen
bool has_touchscreen_ui = DisplayServer::get_singleton()->is_touchscreen_available();
bool is_native_touchscreen = has_touchscreen_ui && !OS::get_singleton()->has_feature("xr_editor"); // Disable some touchscreen settings by default for the XR Editor.
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_touch_optimizations", is_native_touchscreen, "")
set_restart_if_changed("interface/touchscreen/enable_touch_optimizations", true);
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_long_press_as_right_click", is_native_touchscreen, "")
set_restart_if_changed("interface/touchscreen/enable_long_press_as_right_click", true);
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_pan_and_scale_gestures", has_touchscreen_ui, "")
set_restart_if_changed("interface/touchscreen/enable_pan_and_scale_gestures", true);
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/touchscreen/scale_gizmo_handles", has_touchscreen_ui ? 3 : 1, "1,5,1")
set_restart_if_changed("interface/touchscreen/scale_gizmo_handles", true);
// Disable some touchscreen settings by default for the XR Editor.
bool is_native_touchscreen = has_touchscreen_ui && !OS::get_singleton()->has_feature("xr_editor");
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_long_press_as_right_click", is_native_touchscreen, "")
set_restart_if_changed("interface/touchscreen/enable_long_press_as_right_click", true);
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/increase_scrollbar_touch_area", is_native_touchscreen, "")
set_restart_if_changed("interface/touchscreen/increase_scrollbar_touch_area", true);
// Only available in the Android editor.
// Only available in the Android/XR editor.
String touch_actions_panel_hints = "Disabled:0,Embedded Panel:1,Floating Panel:2";
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "interface/touchscreen/touch_actions_panel", 1, touch_actions_panel_hints)