Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/ui_parts/export_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var dimensions := Vector2.ZERO
@onready var file_title: Label = %FileTitle
@onready var info_tooltip: MarginContainer = %InfoTooltip
@onready var quality_related_container: HBoxContainer = %QualityRelatedContainer
@onready var titled_panel: HTitledPanel = %TitledPanel
@onready var titled_panel: VBoxContainer = %TitledPanel

func _exit_tree() -> void:
UR.free()
Expand Down Expand Up @@ -72,16 +72,6 @@ func _ready() -> void:
%HeightContainer/Label.text = Translator.translate("Height") + ":"
cancel_button.text = Translator.translate("Cancel")
export_button.text = Translator.translate("Export")

titled_panel.corner_radius_bottom_left = 0
titled_panel.corner_radius_bottom_right = 5
titled_panel.corner_radius_top_left = 5
titled_panel.corner_radius_top_right = 5
titled_panel.color = ThemeUtils.common_panel_inner_color
titled_panel.border_color = ThemeUtils.common_panel_border_color
titled_panel.border_width = 2
titled_panel.title_margin = 2
titled_panel.panel_margin = 8


func _on_export_button_pressed() -> void:
Expand Down
8 changes: 3 additions & 5 deletions src/ui_parts/export_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[gd_scene load_steps=8 format=3 uid="uid://c13dadqbljqlu"]
[gd_scene load_steps=7 format=3 uid="uid://c13dadqbljqlu"]

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

[node name="TitledPanel" type="Container" parent="MarginContainer/VBoxContainer"]
[node name="TitledPanel" type="VBoxContainer" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
script = ExtResource("2_07m68")

[node name="PreviewContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TitledPanel"]
layout_mode = 2
Expand Down
19 changes: 8 additions & 11 deletions src/ui_parts/global_actions.gd
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ func _on_more_options_pressed() -> void:
"Check for updates"), ShortcutUtils.fn("check_updates"), false,
load("res://assets/icons/Reload.svg"), "check_updates"))

if can_show_savedata_folder:
buttons_arr.append(ContextPopup.create_button(Translator.translate(
"View savedata"), open_savedata_folder , false,
load("res://assets/icons/OpenFolder.svg")))

var antialias_fraction := 0.25
var final_size := 16
var first_resizing_size := final_size / antialias_fraction
Expand All @@ -101,15 +96,17 @@ func _on_more_options_pressed() -> void:
ShortcutUtils.fn("about_info"), false,
ImageTexture.create_from_image(about_image), "about_info")
buttons_arr.append(about_btn)
# It requires to hover over it to see details, which is not possible on Android.
# Would re-enable it in future with a better UX.
#buttons_arr.append(ContextPopup.create_button(Translator.translate(
#"Donate…"), ShortcutUtils.fn("about_donate"), false,
#load("res://assets/icons/Heart.svg"), "about_donate"))
buttons_arr.append(ContextPopup.create_button(Translator.translate(
"Donate…"), ShortcutUtils.fn("about_donate"), false,
load("res://assets/icons/Heart.svg"), "about_donate"))
"GodSVG repository"), ShortcutUtils.fn("about_godsvg_repo"), false,
load("res://assets/icons/Link.svg"), ""))
buttons_arr.append(ContextPopup.create_button(Translator.translate(
"GodSVG repository"), ShortcutUtils.fn("about_repo"), false,
"GodSVG-Mobile repository"), ShortcutUtils.fn("about_repo"), false,
load("res://assets/icons/Link.svg"), "about_repo"))
buttons_arr.append(ContextPopup.create_button(Translator.translate(
"GodSVG website"), ShortcutUtils.fn("about_website"), false,
load("res://assets/icons/Link.svg"), "about_website"))
var separator_indices := PackedInt32Array([1, 3])
if can_show_savedata_folder:
separator_indices = PackedInt32Array([2, 4])
Expand Down
13 changes: 7 additions & 6 deletions src/ui_parts/shortcut_panel_config.tscn
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[gd_scene load_steps=3 format=3 uid="uid://cnay1l0u6a5tw"]

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

[node name="ShortcutPanelConfig" type="PanelContainer"]
custom_minimum_size = Vector2(460, 300)
custom_minimum_size = Vector2(200, 300)
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -225.0
offset_left = -112.0
offset_top = -150.0
offset_right = 225.0
offset_right = 112.0
offset_bottom = 150.0
grow_horizontal = 2
grow_vertical = 2
Expand All @@ -35,7 +35,6 @@ theme_type_variation = &"SpaciousPanel"

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/separation = 36

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

[node name="LayoutBox" type="HBoxContainer" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer"]
[node name="LayoutBox" type="VBoxContainer" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer"]
custom_minimum_size = Vector2(120, 0)
layout_mode = 2
size_flags_vertical = 4

[node name="LayoutLabel" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer/LayoutBox"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 13
horizontal_alignment = 1

[node name="LayoutDropdown" parent="VBoxContainer/PanelContainer/HBoxContainer/ConfigContainer/LayoutBox" instance=ExtResource("2_pru61")]
unique_name_in_owner = true
Expand Down
4 changes: 2 additions & 2 deletions src/ui_parts/update_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func _ready() -> void:
func request() -> void:
retry_button.hide()
status_label.text = Translator.translate("Retrieving information...")
var err := http.request("https://api.github.com/repos/MewPurPur/GodSVG/releases",
["User-Agent: MewPurPur/GodSVG"])
var err := http.request("https://api.github.com/repos/syntaxerror247/GodSVG-Mobile/releases",
["User-Agent: syntaxerror247/GodSVG-Mobile"])
if err != OK:
display_error_message(error_string(err))

Expand Down
2 changes: 1 addition & 1 deletion src/ui_parts/update_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dtyn8imbyo2rg"]

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

[node name="UpdateMenu" type="PanelContainer"]
custom_minimum_size = Vector2(300, 160)
Expand Down
4 changes: 2 additions & 2 deletions src/ui_widgets/preview_rect.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=6 format=3 uid="uid://xh26qa68xed4"]

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

Expand Down
5 changes: 3 additions & 2 deletions src/utils/ShortcutUtils.gd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const _shortcut_categories_dict: Dictionary[String, Dictionary] = {
"about_info": true,
"about_donate": true,
"about_repo": true,
"about_website": true,
"about_website": false,
"check_updates": true,
}
}
Expand Down Expand Up @@ -106,7 +106,8 @@ static func fn(shortcut: String) -> Callable:
"select_all": return State.select_all
"about_info": return HandlerGUI.open_about
"about_donate": return HandlerGUI.open_donate
"about_repo": return OS.shell_open.bind("https://github.com/MewPurPur/GodSVG")
"about_repo": return OS.shell_open.bind("https://github.com/syntaxerror247/GodSVG-Mobile")
"about_godsvg_repo": return OS.shell_open.bind("https://github.com/MewPurPur/GodSVG")
"about_website": return OS.shell_open.bind("https://godsvg.com")
"check_updates": return HandlerGUI.open_update_checker
"open_settings": return HandlerGUI.open_settings
Expand Down
Loading