From 6cc3548fdd5d6abfb2c92813c4322c89cc8828b8 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 19 Jul 2022 11:58:24 +0200 Subject: [PATCH] Change text to icon --- addons/SimpleTODO/TODOColumn.gd | 8 ++------ addons/SimpleTODO/TODOColumn.tscn | 9 ++++----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/addons/SimpleTODO/TODOColumn.gd b/addons/SimpleTODO/TODOColumn.gd index 1bad20c..24e1efe 100644 --- a/addons/SimpleTODO/TODOColumn.gd +++ b/addons/SimpleTODO/TODOColumn.gd @@ -12,6 +12,7 @@ onready var item_container = $VBoxContainer/ScrollContainer/Items onready var counter = $VBoxContainer/Head/Counter onready var delete_button = $VBoxContainer/Actions/DeleteColumn onready var timer = $Timer + var undo_redo: UndoRedo var minimized = false setget set_minimized var main: Control @@ -23,13 +24,8 @@ var item_margin = 20 func set_minimized(val): minimized = val - - var new_text = "V" - - if !val: - new_text = "^" - minimize_button.text = new_text + minimize_button.icon = get_icon("ArrowDown" if minimized else "ArrowUp", "EditorIcons") top_separator.visible = !val scroll_container.visible = !val diff --git a/addons/SimpleTODO/TODOColumn.tscn b/addons/SimpleTODO/TODOColumn.tscn index 4cb0269..904beaf 100644 --- a/addons/SimpleTODO/TODOColumn.tscn +++ b/addons/SimpleTODO/TODOColumn.tscn @@ -55,25 +55,24 @@ mouse_default_cursor_shape = 13 [node name="Name" type="LineEdit" parent="VBoxContainer/Head"] margin_left = 24.0 -margin_right = 337.0 +margin_right = 344.0 margin_bottom = 24.0 size_flags_horizontal = 3 text = "Column name" [node name="Counter" type="Label" parent="VBoxContainer/Head"] -margin_left = 341.0 +margin_left = 348.0 margin_top = 5.0 -margin_right = 369.0 +margin_right = 376.0 margin_bottom = 19.0 rect_min_size = Vector2( 28, 0 ) text = "0" align = 1 [node name="Minimize" type="Button" parent="VBoxContainer/Head"] -margin_left = 373.0 +margin_left = 380.0 margin_right = 392.0 margin_bottom = 24.0 -text = "^" [node name="TopSeparator" type="HSeparator" parent="VBoxContainer"] margin_top = 28.0