1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Add a single window mode setting in the preferences

True by default, when set to false the UI uses multiple windows
This commit is contained in:
Emmanouil Papadeas 2024-01-24 18:31:22 +02:00
parent f0a5637d8a
commit ce7a5e77ba
4 changed files with 44 additions and 0 deletions

View file

@ -747,6 +747,18 @@ msgstr ""
msgid "Use native file dialogs"
msgstr ""
#. Found in the preferences, tooltip of the "Use native file dialogs" option.
msgid "When this setting is enabled, the native file dialogs of the operating system are being used, instead of Pixelorama's custom ones."
msgstr ""
#. Found in the preferences, under the interface section. When this setting is enabled, Pixelorama's subwindows will be embedded in the main window, otherwise each dialog will be its own separate window.
msgid "Single window mode"
msgstr ""
#. Found in the preferences, tooltip of the "Single window mode" option.
msgid "When this setting is enabled, Pixelorama's subwindows will be embedded in the main window, otherwise each dialog will be its own separate window."
msgstr ""
msgid "Dark"
msgstr ""

View file

@ -158,6 +158,8 @@ var font_size := 16:
control.theme.set_font_size("font_size", "HeaderSmall", value + 2)
## Found in Preferences. If [code]true[/code], the interface dims on popups.
var dim_on_popup := true
## Found in Preferences. If [code]true[/code], the native file dialogs of the
## operating system are being used, instead of Godot's FileDialog node.
var use_native_file_dialogs := false:
set(value):
use_native_file_dialogs = value
@ -165,6 +167,14 @@ var use_native_file_dialogs := false:
await tree_entered
await get_tree().process_frame
get_tree().set_group(&"FileDialogs", "use_native_dialog", value)
## Found in Preferences. If [code]true[/code], subwindows are embedded in the main window.
var single_window_mode := true:
set(value):
single_window_mode = value
if OS.has_feature("editor"):
return
ProjectSettings.set_setting("display/window/subwindows/embed_subwindows", value)
ProjectSettings.save_custom(OVERRIDE_FILE)
## Found in Preferences. The modulation color (or simply color) of icons.
var modulate_icon_color := Color.GRAY
## Found in Preferences. Determines if [member modulate_icon_color] uses custom or theme color.
@ -542,6 +552,7 @@ func _init() -> void:
data_directories.append(default_loc.path_join(HOME_SUBDIR_NAME))
if ProjectSettings.get_setting("display/window/tablet_driver") == "winink":
tablet_driver = 1
single_window_mode = ProjectSettings.get_setting("display/window/subwindows/embed_subwindows")
func _ready() -> void:

View file

@ -14,6 +14,13 @@ var preferences: Array[Preference] = [
Preference.new(
"use_native_file_dialogs", "Interface/InterfaceOptions/NativeFileDialogs", "button_pressed"
),
Preference.new(
"single_window_mode",
"Interface/InterfaceOptions/SingleWindowMode",
"button_pressed",
true,
true
),
Preference.new("icon_color_from", "Interface/ButtonOptions/IconColorOptionButton", "selected"),
Preference.new("custom_icon_color", "Interface/ButtonOptions/IconColorButton", "color"),
Preference.new("left_tool_color", "Interface/ButtonOptions/LeftToolColorButton", "color"),

View file

@ -217,6 +217,20 @@ text = "Use native file dialogs"
[node name="NativeFileDialogs" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "When this setting is enabled, the native file dialogs of the operating system are being used, instead of Pixelorama's custom ones."
mouse_default_cursor_shape = 2
button_pressed = true
text = "On"
[node name="SingleWindowModeLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
layout_mode = 2
size_flags_horizontal = 3
text = "Single window mode"
[node name="SingleWindowMode" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "When this setting is enabled, Pixelorama's subwindows will be embedded in the main window, otherwise each dialog will be its own separate window."
mouse_default_cursor_shape = 2
button_pressed = true
text = "On"