From f808614384e834b66d989d800869cfb1b3bae4f2 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Sat, 15 Feb 2020 02:34:42 -0300 Subject: [PATCH] Hide presets in ColorPickers --- Scripts/Dialogs/OutlineDialog.gd | 3 +++ Scripts/Dialogs/PreferencesDialog.gd | 4 ++++ Scripts/Main.gd | 3 +++ Scripts/Palette/EditPalettePopup.gd | 3 +++ 4 files changed, 13 insertions(+) diff --git a/Scripts/Dialogs/OutlineDialog.gd b/Scripts/Dialogs/OutlineDialog.gd index 14b59fced..e2b5def35 100644 --- a/Scripts/Dialogs/OutlineDialog.gd +++ b/Scripts/Dialogs/OutlineDialog.gd @@ -1,5 +1,8 @@ extends ConfirmationDialog +func _ready() -> void: + $OptionsContainer/OutlineColor.get_picker().presets_visible = false + func _on_OutlineDialog_confirmed() -> void: var outline_color : Color = $OptionsContainer/OutlineColor.color var thickness : int = $OptionsContainer/ThickValue.value diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index ad3376ed2..b854f8cbb 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -82,6 +82,10 @@ func _ready() -> void: Global.default_fill_color = fill_color default_fill_color.color = Global.default_fill_color + $"HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GridColor".get_picker().presets_visible = false + $"HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GridColor".get_picker().presets_visible = false + $HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/DefaultFillColor.get_picker().presets_visible = false + func _on_PreferencesDialog_about_to_show(changed_language := false) -> void: var root := tree.create_item() var general_button := tree.create_item(root) diff --git a/Scripts/Main.gd b/Scripts/Main.gd index c414a4a61..a6f7ae1ac 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -165,6 +165,9 @@ func _ready() -> void: Import.import_brushes("Brushes") + $MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/ColorButtonsVertical/ColorPickersCenter/ColorPickersHorizontal/LeftColorPickerButton.get_picker().presets_visible = false + $MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/ColorButtonsVertical/ColorPickersCenter/ColorPickersHorizontal/RightColorPickerButton.get_picker().presets_visible = false + if not Global.config_cache.has_section_key("preferences", "startup"): Global.config_cache.set_value("preferences", "startup", true) if not Global.config_cache.get_value("preferences", "startup"): diff --git a/Scripts/Palette/EditPalettePopup.gd b/Scripts/Palette/EditPalettePopup.gd index 457d176f7..c6fd4e9e9 100644 --- a/Scripts/Palette/EditPalettePopup.gd +++ b/Scripts/Palette/EditPalettePopup.gd @@ -11,6 +11,9 @@ onready var palette_grid = $VBoxContainer/HBoxContainer/Panel/ScrollContainer/Ed onready var color_name_edit = $VBoxContainer/PaletteOptions/EditPaletteColorNameLineEdit onready var palette_name_edit = $VBoxContainer/PaletteOptions/EditPaletteNameLineEdit +func _ready() -> void: + $VBoxContainer/HBoxContainer/EditPaletteColorPicker.presets_visible = false + func open(palette : String) -> void: current_palette = palette palette_name_edit.text = current_palette