1- [gd_scene load_steps =23 format =3 uid ="uid://dobe3b68py6dw" ]
1+ [gd_scene load_steps =24 format =3 uid ="uid://dobe3b68py6dw" ]
22
33[ext_resource type ="Theme" uid ="uid://bbsoqdy0nn2wf" path ="res://Application.theme" id ="1_wph70" ]
44[ext_resource type ="Script" path ="res://scripts/ImageScrollManager.gd" id ="2_i2scm" ]
55[ext_resource type ="Script" path ="res://scripts/ImageViewManager.gd" id ="3_ncvqp" ]
66[ext_resource type ="FontFile" uid ="uid://dinyhiwiyllcs" path ="res://assets/fonts/cantarell/Cantarell-Bold.ttf" id ="11_ow6c5" ]
77[ext_resource type ="Theme" uid ="uid://bf7i7i8nhw47o" path ="res://FileDialog.theme" id ="12_fmmtm" ]
88
9+ [sub_resource type ="GDScript" id ="GDScript_kfh2f" ]
10+ script/source = "extends VSplitContainer
11+
12+
13+ # Called when the node enters the scene tree for the first time.
14+ func _ready () -> void :
15+ pass # Replace with function body.
16+
17+
18+ func _gui_input (event : InputEvent ) -> void :
19+ # When this part is clicked, unfocus all GUI elements
20+ if get_viewport ().gui_get_focus_owner () != null :
21+ get_viewport ().gui_get_focus_owner ().release_focus ()
22+ "
23+
924[sub_resource type ="GDScript" id ="GDScript_byb03" ]
1025script/source = "extends AspectRatioContainer
1126
@@ -21,7 +36,7 @@ func _ready() -> void:
2136[sub_resource type ="StyleBoxFlat" id ="StyleBoxFlat_65bg7" ]
2237bg_color = Color (0.6 , 0.6 , 0.6 , 0 )
2338border_width_left = 1024
24- border_width_top = 1000
39+ border_width_top = 1024
2540border_width_right = 1024
2641border_width_bottom = 1024
2742border_color = Color (0 , 0 , 0 , 0.568627 )
@@ -54,6 +69,12 @@ func _ready() -> void:
5469 func (value : float ):
5570 Application .crop_to_size .x = int (value )
5671 )
72+
73+ func _gui_input (event : InputEvent ) -> void :
74+ # On Escape release focus if owned
75+ if event is InputEventKey :
76+ if event .keycode == KEY_ESCAPE and has_focus ():
77+ release_focus ()
5778"
5879
5980[sub_resource type ="GDScript" id ="GDScript_xdud2" ]
@@ -71,6 +92,13 @@ func _ready() -> void:
7192 func (value : float ):
7293 Application .crop_to_size .y = int (value )
7394 )
95+
96+
97+ func _gui_input (event : InputEvent ) -> void :
98+ # On Escape release focus if owned
99+ if event is InputEventKey :
100+ if event .keycode == KEY_ESCAPE and has_focus ():
101+ release_focus ()
74102"
75103
76104[sub_resource type ="Image" id ="Image_fy5dq" ]
@@ -153,6 +181,7 @@ func _ready() -> void:
153181 func (dir : String ):
154182 input_path .text = dir
155183 Application .entry_path = dir
184+ release_focus ()
156185 )
157186
158187"
@@ -169,6 +198,12 @@ func _ready() -> void:
169198
170199 toggled .connect (func (value : bool ): Application .load_subdirectories = value )
171200
201+
202+ func _gui_input (event : InputEvent ) -> void :
203+ # On Escape release focus if owned
204+ if event is InputEventKey :
205+ if event .keycode == KEY_ESCAPE and has_focus ():
206+ release_focus ()
172207"
173208
174209[node name ="MainPanel" type ="PanelContainer" ]
@@ -177,6 +212,7 @@ anchor_right = 1.0
177212anchor_bottom = 1.0
178213grow_horizontal = 2
179214grow_vertical = 2
215+ mouse_filter = 1
180216theme = ExtResource ("1_wph70" )
181217
182218[node name ="HSplitContainer" type ="HSplitContainer" parent ="." ]
@@ -188,6 +224,7 @@ size_flags_horizontal = 3
188224theme_override_constants/separation = 8
189225theme_override_constants/minimum_grab_thickness = 20
190226theme_override_constants/autohide = 0
227+ script = SubResource ("GDScript_kfh2f" )
191228
192229[node name ="CenterContainer" type ="PanelContainer" parent ="HSplitContainer/VSplitContainer" ]
193230clip_contents = true
@@ -206,16 +243,23 @@ layout_mode = 2
206243mouse_filter = 1
207244
208245[node name ="Sprite2D" type ="Sprite2D" parent ="HSplitContainer/VSplitContainer/CenterContainer/CenterContainer/Control" ]
209- scale = Vector2 (0.322 , 0.322 )
246+ scale = Vector2 (4.272 , 4.272 )
210247script = ExtResource ("3_ncvqp" )
211248
212- [node name ="AspectRatioContainer " type ="AspectRatioContainer " parent ="HSplitContainer/VSplitContainer/CenterContainer" ]
249+ [node name ="MarginContainer " type ="MarginContainer " parent ="HSplitContainer/VSplitContainer/CenterContainer" ]
213250clip_contents = true
214251layout_mode = 2
252+ theme_override_constants/margin_left = 30
253+ theme_override_constants/margin_top = 30
254+ theme_override_constants/margin_right = 30
255+ theme_override_constants/margin_bottom = 30
256+
257+ [node name ="AspectRatioContainer" type ="AspectRatioContainer" parent ="HSplitContainer/VSplitContainer/CenterContainer/MarginContainer" ]
258+ layout_mode = 2
215259mouse_filter = 2
216260script = SubResource ("GDScript_byb03" )
217261
218- [node name ="CutOutArea" type ="Panel" parent ="HSplitContainer/VSplitContainer/CenterContainer/AspectRatioContainer" ]
262+ [node name ="CutOutArea" type ="Panel" parent ="HSplitContainer/VSplitContainer/CenterContainer/MarginContainer/ AspectRatioContainer" ]
219263unique_name_in_owner = true
220264layout_mode = 2
221265mouse_filter = 2
0 commit comments