@@ -2,7 +2,7 @@ extends PanelContainer
22
33const PaletteConfigWidget = preload ("res://src/ui_widgets/palette_config.tscn" )
44const ShortcutConfigWidget = preload ("res://src/ui_widgets/setting_shortcut.tscn" )
5- const ShortcutShowcaseWidget = preload ("res://src/ui_widgets/presented_shortcut.tscn" )
5+ # const ShortcutShowcaseWidget = preload("res://src/ui_widgets/presented_shortcut.tscn")
66const SettingFrame = preload ("res://src/ui_widgets/setting_frame.tscn" )
77const ProfileFrame = preload ("res://src/ui_widgets/profile_frame.tscn" )
88
@@ -46,7 +46,8 @@ func setup_tabs() -> void:
4646 var button_group := ButtonGroup .new ()
4747 add_tab ("formatting" , Translator .translate ("Formatting" ), button_group )
4848 add_tab ("palettes" , Translator .translate ("Palettes" ), button_group )
49- add_tab ("shortcuts" , Translator .translate ("Shortcuts" ), button_group )
49+ # Removing shortcuts tab as this is not really needed for mobile port.
50+ # add_tab("shortcuts", Translator.translate("Shortcuts"), button_group)
5051 add_tab ("theming" , Translator .translate ("Theming" ), button_group )
5152 add_tab ("other" , Translator .translate ("Other" ), button_group )
5253
@@ -113,32 +114,32 @@ func setup_content() -> void:
113114 vbox .size_flags_horizontal = Control .SIZE_EXPAND_FILL
114115 content_container .add_child (vbox )
115116 rebuild_palettes ()
116- "shortcuts" :
117- advice_panel .hide ()
118- var vbox := VBoxContainer .new ()
119- vbox .size_flags_horizontal = Control .SIZE_EXPAND_FILL
120- vbox .add_theme_constant_override ("separation" , 6 )
121- content_container .add_child (vbox )
122- var categories := HFlowContainer .new ()
123- var button_group := ButtonGroup .new ()
124- for tab_idx in shortcut_tab_names :
125- var btn := Button .new ()
126- btn .toggle_mode = true
127- btn .button_group = button_group
128- btn .pressed .connect (show_shortcuts .bind (tab_idx ))
129- btn .text = get_translated_shortcut_tab (tab_idx )
130- btn .mouse_default_cursor_shape = Control .CURSOR_POINTING_HAND
131- btn .focus_mode = Control .FOCUS_NONE
132- btn .action_mode = BaseButton .ACTION_MODE_BUTTON_PRESS
133- categories .add_child (btn )
134- vbox .add_child (categories )
135- var shortcuts := VBoxContainer .new ()
136- shortcuts .add_theme_constant_override ("separation" , 3 )
137- shortcuts .size_flags_horizontal = Control .SIZE_EXPAND_FILL
138- shortcuts .size_flags_vertical = Control .SIZE_EXPAND_FILL
139- vbox .add_child (shortcuts )
140- categories .get_child (0 ).button_pressed = true
141- categories .get_child (0 ).pressed .emit ()
117+ # "shortcuts":
118+ # advice_panel.hide()
119+ # var vbox := VBoxContainer.new()
120+ # vbox.size_flags_horizontal = Control.SIZE_EXPAND_FILL
121+ # vbox.add_theme_constant_override("separation", 6)
122+ # content_container.add_child(vbox)
123+ # var categories := HFlowContainer.new()
124+ # var button_group := ButtonGroup.new()
125+ # for tab_idx in shortcut_tab_names:
126+ # var btn := Button.new()
127+ # btn.toggle_mode = true
128+ # btn.button_group = button_group
129+ # btn.pressed.connect(show_shortcuts.bind(tab_idx))
130+ # btn.text = get_translated_shortcut_tab(tab_idx)
131+ # btn.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
132+ # btn.focus_mode = Control.FOCUS_NONE
133+ # btn.action_mode = BaseButton.ACTION_MODE_BUTTON_PRESS
134+ # categories.add_child(btn)
135+ # vbox.add_child(categories)
136+ # var shortcuts := VBoxContainer.new()
137+ # shortcuts.add_theme_constant_override("separation", 3)
138+ # shortcuts.size_flags_horizontal = Control.SIZE_EXPAND_FILL
139+ # shortcuts.size_flags_vertical = Control.SIZE_EXPAND_FILL
140+ # vbox.add_child(shortcuts)
141+ # categories.get_child(0).button_pressed = true
142+ # categories.get_child(0).pressed.emit()
142143 "theming" :
143144 advice_panel .hide ()
144145 create_setting_container ()
@@ -220,16 +221,18 @@ func setup_content() -> void:
220221 SaveData .HANDLE_SIZE_MIN , SaveData .HANDLE_SIZE_MAX )
221222 add_advice (Translator .translate (
222223 "Changes the visual size and grabbing area of handles." ))
223- current_setup_setting = "ui_scale"
224- add_number_dropdown (Translator .translate ("UI scale" ),
225- [0.75 , 1.0 , 1.25 , 1.5 , 1.75 , 2.0 , 2.5 , 3.0 , 4.0 ], false , false ,
226- SaveData .UI_SCALE_MIN , SaveData .UI_SCALE_MAX )
227- add_advice (Translator .translate (
228- "Changes the scale of the visual user interface." ))
229- current_setup_setting = "auto_ui_scale"
230- add_checkbox (Translator .translate ("Auto UI scale" ))
231- add_advice (Translator .translate (
232- "Scales the user interface based on the screen size." ))
224+
225+ # Temporarily hiding settings to change scale.
226+ # current_setup_setting = "ui_scale"
227+ # add_number_dropdown(Translator.translate("UI scale"),
228+ # [0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0], false, false,
229+ # SaveData.UI_SCALE_MIN, SaveData.UI_SCALE_MAX)
230+ # add_advice(Translator.translate(
231+ # "Changes the scale of the visual user interface."))
232+ # current_setup_setting = "auto_ui_scale"
233+ # add_checkbox(Translator.translate("Auto UI scale"))
234+ # add_advice(Translator.translate(
235+ # "Scales the user interface based on the screen size."))
233236
234237 # Disable mouse wrap if not available.
235238 if not DisplayServer .has_feature (DisplayServer .FEATURE_MOUSE_WARP ):
@@ -573,19 +576,19 @@ func show_formatter(category: String) -> void:
573576 add_checkbox (Translator .translate ("Remove unnecessary parameters" ))
574577
575578
576- func show_shortcuts (category : String ) -> void :
577- var shortcuts_container := content_container .get_child (- 1 ).get_child (- 1 )
578- for child in shortcuts_container .get_children ():
579- child .queue_free ()
580-
581- for action in ShortcutUtils .get_shortcuts (category ):
582- var shortcut_config := ShortcutConfigWidget .instantiate () if \
583- ShortcutUtils .is_shortcut_modifiable (action ) else \
584- ShortcutShowcaseWidget .instantiate ()
585-
586- shortcuts_container .add_child (shortcut_config )
587- shortcut_config .label .text = TranslationUtils .get_shortcut_description (action )
588- shortcut_config .setup (action )
579+ # func show_shortcuts(category: String) -> void:
580+ # var shortcuts_container := content_container.get_child(-1).get_child(-1)
581+ # for child in shortcuts_container.get_children():
582+ # child.queue_free()
583+ #
584+ # for action in ShortcutUtils.get_shortcuts(category):
585+ # var shortcut_config := ShortcutConfigWidget.instantiate() if\
586+ # ShortcutUtils.is_shortcut_modifiable(action) else\
587+ # ShortcutShowcaseWidget.instantiate()
588+ #
589+ # shortcuts_container.add_child(shortcut_config)
590+ # shortcut_config.label.text = TranslationUtils.get_shortcut_description(action)
591+ # shortcut_config.setup(action)
589592
590593func create_setting_container () -> void :
591594 setting_container = VBoxContainer .new ()
0 commit comments