You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-03 16:55:53 +00:00
Enable granular control of touchscreen related settings
This commit is contained in:
@@ -305,7 +305,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
||||
|
||||
String preset = EDITOR_GET("interface/theme/preset");
|
||||
|
||||
bool enable_touchscreen_touch_area = EDITOR_GET("interface/theme/enable_touchscreen_touch_area");
|
||||
bool increase_scrollbar_touch_area = EDITOR_GET("interface/touchscreen/increase_scrollbar_touch_area");
|
||||
bool highlight_tabs = EDITOR_GET("interface/theme/highlight_tabs");
|
||||
int border_size = EDITOR_GET("interface/theme/border_size");
|
||||
|
||||
@@ -1050,7 +1050,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
||||
// HScrollBar
|
||||
Ref<Texture> empty_icon = memnew(ImageTexture);
|
||||
|
||||
if (enable_touchscreen_touch_area) {
|
||||
if (increase_scrollbar_touch_area) {
|
||||
theme->set_stylebox("scroll", "HScrollBar", make_line_stylebox(separator_color, 50));
|
||||
} else {
|
||||
theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon("GuiScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
|
||||
@@ -1068,7 +1068,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
||||
theme->set_icon("decrement_pressed", "HScrollBar", empty_icon);
|
||||
|
||||
// VScrollBar
|
||||
if (enable_touchscreen_touch_area) {
|
||||
if (increase_scrollbar_touch_area) {
|
||||
theme->set_stylebox("scroll", "VScrollBar", make_line_stylebox(separator_color, 50, 1, 1, true));
|
||||
} else {
|
||||
theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon("GuiScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
|
||||
|
||||
Reference in New Issue
Block a user