Skip to content

Commit dbaf6ac

Browse files
Fix some more UI overflow issues (#16)
1 parent a2c1442 commit dbaf6ac

File tree

8 files changed

+27
-40
lines changed

8 files changed

+27
-40
lines changed

src/ui_parts/export_menu.gd

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var dimensions := Vector2.ZERO
2424
@onready var file_title: Label = %FileTitle
2525
@onready var info_tooltip: MarginContainer = %InfoTooltip
2626
@onready var quality_related_container: HBoxContainer = %QualityRelatedContainer
27-
@onready var titled_panel: HTitledPanel = %TitledPanel
27+
@onready var titled_panel: VBoxContainer = %TitledPanel
2828

2929
func _exit_tree() -> void:
3030
UR.free()
@@ -72,16 +72,6 @@ func _ready() -> void:
7272
%HeightContainer/Label.text = Translator.translate("Height") + ":"
7373
cancel_button.text = Translator.translate("Cancel")
7474
export_button.text = Translator.translate("Export")
75-
76-
titled_panel.corner_radius_bottom_left = 0
77-
titled_panel.corner_radius_bottom_right = 5
78-
titled_panel.corner_radius_top_left = 5
79-
titled_panel.corner_radius_top_right = 5
80-
titled_panel.color = ThemeUtils.common_panel_inner_color
81-
titled_panel.border_color = ThemeUtils.common_panel_border_color
82-
titled_panel.border_width = 2
83-
titled_panel.title_margin = 2
84-
titled_panel.panel_margin = 8
8575

8676

8777
func _on_export_button_pressed() -> void:

src/ui_parts/export_menu.tscn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
[gd_scene load_steps=8 format=3 uid="uid://c13dadqbljqlu"]
1+
[gd_scene load_steps=7 format=3 uid="uid://c13dadqbljqlu"]
22

3-
[ext_resource type="Script" path="res://src/ui_parts/export_menu.gd" id="1_objnb"]
4-
[ext_resource type="Script" path="res://src/ui_widgets/HTitledPanel.gd" id="2_07m68"]
3+
[ext_resource type="Script" uid="uid://bouo2y3v0gy4a" path="res://src/ui_parts/export_menu.gd" id="1_objnb"]
54
[ext_resource type="PackedScene" uid="uid://xh26qa68xed4" path="res://src/ui_widgets/preview_rect.tscn" id="2_ewk0a"]
65
[ext_resource type="Texture2D" uid="uid://v0lqyuvo50yq" path="res://assets/icons/Info.svg" id="2_rk3rd"]
76
[ext_resource type="FontFile" uid="uid://clpf84p1lfwlp" path="res://assets/fonts/Font.ttf" id="5_s3e6m"]
@@ -37,10 +36,9 @@ unique_name_in_owner = true
3736
layout_mode = 2
3837
horizontal_alignment = 1
3938

40-
[node name="TitledPanel" type="Container" parent="MarginContainer/VBoxContainer"]
39+
[node name="TitledPanel" type="VBoxContainer" parent="MarginContainer/VBoxContainer"]
4140
unique_name_in_owner = true
4241
layout_mode = 2
43-
script = ExtResource("2_07m68")
4442

4543
[node name="PreviewContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TitledPanel"]
4644
layout_mode = 2

src/ui_parts/global_actions.gd

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ func _on_more_options_pressed() -> void:
8181
"Check for updates"), ShortcutUtils.fn("check_updates"), false,
8282
load("res://assets/icons/Reload.svg"), "check_updates"))
8383

84-
if can_show_savedata_folder:
85-
buttons_arr.append(ContextPopup.create_button(Translator.translate(
86-
"View savedata"), open_savedata_folder , false,
87-
load("res://assets/icons/OpenFolder.svg")))
88-
8984
var antialias_fraction := 0.25
9085
var final_size := 16
9186
var first_resizing_size := final_size / antialias_fraction
@@ -101,15 +96,17 @@ func _on_more_options_pressed() -> void:
10196
ShortcutUtils.fn("about_info"), false,
10297
ImageTexture.create_from_image(about_image), "about_info")
10398
buttons_arr.append(about_btn)
99+
# It requires to hover over it to see details, which is not possible on Android.
100+
# Would re-enable it in future with a better UX.
101+
#buttons_arr.append(ContextPopup.create_button(Translator.translate(
102+
#"Donate…"), ShortcutUtils.fn("about_donate"), false,
103+
#load("res://assets/icons/Heart.svg"), "about_donate"))
104104
buttons_arr.append(ContextPopup.create_button(Translator.translate(
105-
"Donate…"), ShortcutUtils.fn("about_donate"), false,
106-
load("res://assets/icons/Heart.svg"), "about_donate"))
105+
"GodSVG repository"), ShortcutUtils.fn("about_godsvg_repo"), false,
106+
load("res://assets/icons/Link.svg"), ""))
107107
buttons_arr.append(ContextPopup.create_button(Translator.translate(
108-
"GodSVG repository"), ShortcutUtils.fn("about_repo"), false,
108+
"GodSVG-Mobile repository"), ShortcutUtils.fn("about_repo"), false,
109109
load("res://assets/icons/Link.svg"), "about_repo"))
110-
buttons_arr.append(ContextPopup.create_button(Translator.translate(
111-
"GodSVG website"), ShortcutUtils.fn("about_website"), false,
112-
load("res://assets/icons/Link.svg"), "about_website"))
113110
var separator_indices := PackedInt32Array([1, 3])
114111
if can_show_savedata_folder:
115112
separator_indices = PackedInt32Array([2, 4])

src/ui_parts/shortcut_panel_config.tscn

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[gd_scene load_steps=3 format=3 uid="uid://cnay1l0u6a5tw"]
22

3-
[ext_resource type="Script" path="res://src/ui_parts/shortcut_panel_config.gd" id="1_eg1f5"]
3+
[ext_resource type="Script" uid="uid://cnmsf3h1qq3q6" path="res://src/ui_parts/shortcut_panel_config.gd" id="1_eg1f5"]
44
[ext_resource type="PackedScene" uid="uid://bp1iblavfxjvu" path="res://src/ui_widgets/enum_dropdown.tscn" id="2_pru61"]
55

66
[node name="ShortcutPanelConfig" type="PanelContainer"]
7-
custom_minimum_size = Vector2(460, 300)
7+
custom_minimum_size = Vector2(200, 300)
88
anchors_preset = 8
99
anchor_left = 0.5
1010
anchor_top = 0.5
1111
anchor_right = 0.5
1212
anchor_bottom = 0.5
13-
offset_left = -225.0
13+
offset_left = -112.0
1414
offset_top = -150.0
15-
offset_right = 225.0
15+
offset_right = 112.0
1616
offset_bottom = 150.0
1717
grow_horizontal = 2
1818
grow_vertical = 2
@@ -35,7 +35,6 @@ theme_type_variation = &"SpaciousPanel"
3535

3636
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer"]
3737
layout_mode = 2
38-
theme_override_constants/separation = 36
3938

4039
[node name="SlotContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer/HBoxContainer"]
4140
unique_name_in_owner = true
@@ -48,14 +47,16 @@ alignment = 1
4847
layout_mode = 2
4948
size_flags_horizontal = 3
5049

51-
[node name="LayoutBox" type="HBoxContainer" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer"]
50+
[node name="LayoutBox" type="VBoxContainer" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer"]
51+
custom_minimum_size = Vector2(120, 0)
5252
layout_mode = 2
5353
size_flags_vertical = 4
5454

5555
[node name="LayoutLabel" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer/LayoutBox"]
5656
unique_name_in_owner = true
5757
layout_mode = 2
5858
theme_override_font_sizes/font_size = 13
59+
horizontal_alignment = 1
5960

6061
[node name="LayoutDropdown" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer/LayoutBox" instance=ExtResource("2_pru61")]
6162
unique_name_in_owner = true

src/ui_parts/update_menu.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ func _ready() -> void:
2727
func request() -> void:
2828
retry_button.hide()
2929
status_label.text = Translator.translate("Retrieving information...")
30-
var err := http.request("https://api.github.com/repos/MewPurPur/GodSVG/releases",
31-
["User-Agent: MewPurPur/GodSVG"])
30+
var err := http.request("https://api.github.com/repos/syntaxerror247/GodSVG-Mobile/releases",
31+
["User-Agent: syntaxerror247/GodSVG-Mobile"])
3232
if err != OK:
3333
display_error_message(error_string(err))
3434

src/ui_parts/update_menu.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[gd_scene load_steps=2 format=3 uid="uid://dtyn8imbyo2rg"]
22

3-
[ext_resource type="Script" path="res://src/ui_parts/update_menu.gd" id="1_up0ed"]
3+
[ext_resource type="Script" uid="uid://c6ca4ckjyrxg3" path="res://src/ui_parts/update_menu.gd" id="1_up0ed"]
44

55
[node name="UpdateMenu" type="PanelContainer"]
66
custom_minimum_size = Vector2(300, 160)

src/ui_widgets/preview_rect.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[gd_scene load_steps=6 format=3 uid="uid://xh26qa68xed4"]
22

3-
[ext_resource type="Script" path="res://src/ui_widgets/preview_rect.gd" id="1_n2xbu"]
4-
[ext_resource type="Shader" path="res://src/shaders/zoom_shader.gdshader" id="2_qrqjp"]
3+
[ext_resource type="Script" uid="uid://cx43kir18is86" path="res://src/ui_widgets/preview_rect.gd" id="1_n2xbu"]
4+
[ext_resource type="Shader" uid="uid://ki2mjb6y33jl" path="res://src/shaders/zoom_shader.gdshader" id="2_qrqjp"]
55
[ext_resource type="Texture2D" uid="uid://c68og6bsqt0lb" path="res://assets/icons/backgrounds/Checkerboard.svg" id="3_tuqha"]
66
[ext_resource type="Texture2D" uid="uid://crx4kcj4o01bs" path="res://assets/icons/SmallQuestionMark.svg" id="4_g76n0"]
77

src/utils/ShortcutUtils.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const _shortcut_categories_dict: Dictionary[String, Dictionary] = {
6868
"about_info": true,
6969
"about_donate": true,
7070
"about_repo": true,
71-
"about_website": true,
71+
"about_website": false,
7272
"check_updates": true,
7373
}
7474
}
@@ -106,7 +106,8 @@ static func fn(shortcut: String) -> Callable:
106106
"select_all": return State.select_all
107107
"about_info": return HandlerGUI.open_about
108108
"about_donate": return HandlerGUI.open_donate
109-
"about_repo": return OS.shell_open.bind("https://github.com/MewPurPur/GodSVG")
109+
"about_repo": return OS.shell_open.bind("https://github.com/syntaxerror247/GodSVG-Mobile")
110+
"about_godsvg_repo": return OS.shell_open.bind("https://github.com/MewPurPur/GodSVG")
110111
"about_website": return OS.shell_open.bind("https://godsvg.com")
111112
"check_updates": return HandlerGUI.open_update_checker
112113
"open_settings": return HandlerGUI.open_settings

0 commit comments

Comments
 (0)