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
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:

env:
# Which godot version to use for exporting.
GODOT_VERSION: 4.4.1
GODOT_VERSION: 4.5
# Which godot release to use for exporting. (stable/rc/beta/alpha)
GODOT_RELEASE: stable
GODOT_RELEASE: beta1
# Used in the editor config file name. Do not change this for patch releases.
GODOT_FEATURE_VERSION: 4.4
GODOT_FEATURE_VERSION: 4.5
# Commit hash
GODOT_COMMIT_HASH: 49a5bc7b6
GODOT_COMMIT_HASH: 46c495ca2
PROJECT_NAME: GodSVG Mobile
BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes module_mbedtls_enabled=yes swappy=no build_profile=../godsvg/.github/disabled_classes.build
BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes disable_physics_2d=yes disable_navigation_2d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes module_mbedtls_enabled=yes swappy=no build_profile=../godsvg/.github/disabled_classes.build
GODOT_REPO: https://github.com/godotengine/godot.git

jobs:
Expand Down
98 changes: 0 additions & 98 deletions addons/SystemBarColorChanger/SystemBarColorChanger.gd

This file was deleted.

1 change: 0 additions & 1 deletion addons/SystemBarColorChanger/SystemBarColorChanger.gd.uid

This file was deleted.

Binary file removed addons/SystemBarColorChanger/icon.png
Binary file not shown.
34 changes: 0 additions & 34 deletions addons/SystemBarColorChanger/icon.png.import

This file was deleted.

7 changes: 0 additions & 7 deletions addons/SystemBarColorChanger/plugin.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions addons/SystemBarColorChanger/plugin.gd

This file was deleted.

1 change: 0 additions & 1 deletion addons/SystemBarColorChanger/plugin.gd.uid

This file was deleted.

10 changes: 7 additions & 3 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ custom_template/release=""
gradle_build/use_gradle_build=false
gradle_build/gradle_build_directory=""
gradle_build/android_source_template=""
gradle_build/compress_native_libraries=false
gradle_build/export_format=0
gradle_build/min_sdk=""
gradle_build/target_sdk=""
gradle_build/custom_theme_attributes={}
architectures/armeabi-v7a=false
architectures/arm64-v8a=true
architectures/x86=false
Expand All @@ -49,9 +49,10 @@ launcher_icons/adaptive_foreground_432x432="res://godot_only/android_icons/adapt
launcher_icons/adaptive_background_432x432="res://godot_only/android_icons/adaptive_background.png"
launcher_icons/adaptive_monochrome_432x432="uid://cop6bgxvtv4uq"
graphics/opengl_debug=false
shader_baker/enabled=false
xr_features/xr_mode=0
gesture/swipe_to_dismiss=false
screen/immersive_mode=false
screen/immersive_mode=true
screen/support_small=true
screen/support_normal=true
screen/support_large=true
Expand Down Expand Up @@ -214,6 +215,7 @@ permissions/write_sms=false
permissions/write_social_stream=false
permissions/write_sync_settings=false
permissions/write_user_dictionary=false
gradle_build/compress_native_libraries=false
wear_os/swipe_to_dismiss=true

[preset.1]
Expand Down Expand Up @@ -243,10 +245,10 @@ custom_template/release=""
gradle_build/use_gradle_build=false
gradle_build/gradle_build_directory=""
gradle_build/android_source_template=""
gradle_build/compress_native_libraries=false
gradle_build/export_format=0
gradle_build/min_sdk=""
gradle_build/target_sdk=""
gradle_build/custom_theme_attributes={}
architectures/armeabi-v7a=true
architectures/arm64-v8a=false
architectures/x86=false
Expand All @@ -267,6 +269,7 @@ launcher_icons/adaptive_foreground_432x432="res://godot_only/android_icons/adapt
launcher_icons/adaptive_background_432x432="res://godot_only/android_icons/adaptive_background.png"
launcher_icons/adaptive_monochrome_432x432="uid://cop6bgxvtv4uq"
graphics/opengl_debug=false
shader_baker/enabled=false
xr_features/xr_mode=0
gesture/swipe_to_dismiss=false
screen/immersive_mode=false
Expand Down Expand Up @@ -432,4 +435,5 @@ permissions/write_sms=false
permissions/write_social_stream=false
permissions/write_sync_settings=false
permissions/write_user_dictionary=false
gradle_build/compress_native_libraries=false
wear_os/swipe_to_dismiss=true
3 changes: 1 addition & 2 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ config/version="1.0-alpha3"
config/tags=PackedStringArray("application", "mobile", "project")
run/main_scene="uid://bihwwoedqcyo8"
config/use_custom_user_dir=true
config/features=PackedStringArray("4.4")
config/features=PackedStringArray("4.5")
run/low_processor_mode=true
boot_splash/bg_color=Color(0.1065, 0.1181, 0.15, 1)
boot_splash/fullsize=false
Expand All @@ -31,7 +31,6 @@ driver/driver="Dummy"
Configs="*res://src/autoload/Configs.gd"
State="*res://src/autoload/State.gd"
HandlerGUI="*res://src/autoload/HandlerGUI.gd"
SystemBarColorChanger="*res://addons/SystemBarColorChanger/SystemBarColorChanger.gd"

[display]

Expand Down
5 changes: 4 additions & 1 deletion src/autoload/State.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ extends Node
const OptionsDialogScene = preload("res://src/ui_widgets/options_dialog.tscn")
const PathCommandPopupScene = preload("res://src/ui_widgets/path_popup.tscn")


signal svg_unknown_change
signal svg_resized

Expand Down Expand Up @@ -63,6 +62,10 @@ func _enter_tree() -> void:

Configs.active_tab_changed.connect(setup_from_tab)
setup_from_tab.call_deferred() # Let everything load before emitting signals.

# Need to wait a frame so the import warnings panel becomes available.
await get_tree().process_frame
FileUtils.apply_svgs_from_paths(OS.get_cmdline_args(), false)

func setup_from_tab() -> void:
var active_tab := Configs.savedata.get_active_tab()
Expand Down
2 changes: 0 additions & 2 deletions src/ui_parts/editor_scene.gd
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func update_theme() -> void:
stylebox.bg_color = ThemeUtils.overlay_panel_inner_color
stylebox.set_content_margin_all(0)
panel_container.add_theme_stylebox_override("panel", stylebox)
SystemBarColorChanger.set_status_bar_color(ThemeUtils.overlay_panel_inner_color)
SystemBarColorChanger.set_navigation_bar_color(ThemeUtils.overlay_panel_inner_color)


func update_layout() -> void:
Expand Down
22 changes: 18 additions & 4 deletions src/utils/FileUtils.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ static func reset_svg() -> void:
if FileAccess.file_exists(file_path):
State.apply_svg_text(FileAccess.get_file_as_string(file_path))

static func apply_svgs_from_paths(paths: PackedStringArray) -> void:
_start_file_import_process(paths, _apply_svg, PackedStringArray(["svg"]))
static func apply_svgs_from_paths(paths: PackedStringArray,
show_incorrect_extension_errors := true) -> void:
_start_file_import_process(paths, _apply_svg, PackedStringArray(["svg"]),
show_incorrect_extension_errors)

static func compare_svg_to_disk_contents(idx := -1) -> FileState:
var tab := Configs.savedata.get_active_tab() if idx == -1 else Configs.savedata.get_tab(idx)
Expand Down Expand Up @@ -216,16 +218,28 @@ completion_callback: Callable, multi_select := false) -> void:

# Preprocessing step where all files with wrong extensions are discarded.
static func _start_file_import_process(file_paths: PackedStringArray,
completion_callback: Callable, allowed_extensions: PackedStringArray) -> void:
completion_callback: Callable, allowed_extensions: PackedStringArray,
show_incorrect_extension_errors := true) -> void:
if not show_incorrect_extension_errors:
for i in range(file_paths.size() - 1, -1, -1):
if not file_paths[i].get_extension() in allowed_extensions:
file_paths.remove_at(i)
if not file_paths.is_empty():
_file_import_proceed(file_paths, completion_callback)
return

var incorrect_extension_file_paths := PackedStringArray()
for i in range(file_paths.size() - 1, -1, -1):
if not file_paths[i].get_extension() in allowed_extensions:
incorrect_extension_file_paths.append(Utils.simplify_file_path(file_paths[i]))
file_paths.remove_at(i)

if file_paths.is_empty():
return

var proceed_callback := _file_import_proceed.bind(file_paths, completion_callback)

if not incorrect_extension_file_paths.is_empty():
if show_incorrect_extension_errors and not incorrect_extension_file_paths.is_empty():
var error_text := TranslationUtils.get_extension_alert_text(allowed_extensions) + "\n"
var passed_list := PackedStringArray() # Only pass if there are more than two.
if incorrect_extension_file_paths.size() >= 2:
Expand Down