diff --git a/Changelog.md b/Changelog.md index 8fdb9d211..5df7e9605 100644 --- a/Changelog.md +++ b/Changelog.md @@ -43,16 +43,17 @@ sapient-cogbag, Kinwailo, Igor Santarek (jegor377), Dávid Gábor BODOR (dragonf - Layer's LineEdit now saves the changes when it loses focus, or when the user presses ESC (or Enter). - LineEdits lose focus when the user presses Enter. - When cloning a frame, the clone will appear next to the original. -- Layer visibility is taken into account when exporting the drawing as a .png file. This means that invisible layers will not be included in the final .png file. +- Layer visibility is taken into account when exporting the drawing as a `.png` file. This means that invisible layers will not be included in the final `.png` file. - The Godot theme has changed. - Visual change, added border outlines to all window dialogs. - Animation now loops by default. - Onion skinning settings have been moved to a popup window, and 2 new buttons were added. One that toggles onion skinning, and one that opens the settings window. - The default window size is now 1280x720, and the minimum window size is 1024x576. - `.pxo` files now use ZSTD compression to result in smaller file sizes. -- Palettes/Brushes get loaded/saved in appropriate locations as specified by the XDG basedir standard, for easier usage of standard linux/bsd packaging methods and for better per-user usability. +- Palettes/Brushes get loaded/saved in appropriate locations as specified by the XDG basedir standard, for easier usage of standard Linux/BSD packaging methods and for better per-user usability. - The splash screen has been revamped and is no longer purple, it now gets affected by the chosen theme. - The brush selection popup now closes when a brush is selected. +- Pixelorama's version number now appears on the window title. ### Fixed - Chinese characters not being rendered in notifications (the labels that appear when undoing/redoing) and at the splash screen for Platinum & Gold Sponsor Placeholder labels diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index d642828f4..4c04c3282 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -264,6 +264,8 @@ var palette_import_file_dialog : FileDialog var error_dialog : AcceptDialog +onready var current_version : String = ProjectSettings.get_setting("application/config/Version") + func _ready() -> void: randomize() @@ -563,7 +565,7 @@ func clear_canvases() -> void: play_forward.pressed = false animation_timer.stop() - self.window_title = "(" + tr("untitled") + ") - Pixelorama" + self.window_title = "(" + tr("untitled") + ") - Pixelorama " + Global.current_version OpenSave.current_save_path = "" control.get_node("ExportDialog").was_exported = false control.file_menu.set_item_text(3, tr("Save...")) diff --git a/src/Autoload/OpenSave.gd b/src/Autoload/OpenSave.gd index c74e62579..b91df1a74 100644 --- a/src/Autoload/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -151,7 +151,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void: if not untitled_backup: # Untitled backup should not change window title and save path current_save_path = path - Global.window_title = path.get_file() + " - Pixelorama" + Global.window_title = path.get_file() + " - Pixelorama " + Global.current_version Global.project_has_changed = false @@ -239,7 +239,7 @@ func save_pxo_file(path : String, autosave : bool) -> void: Global.notification_label("File saved") if backup_save_path == "": - Global.window_title = path.get_file() + " - Pixelorama" + Global.window_title = path.get_file() + " - Pixelorama " + Global.current_version else: Global.notification_label("File failed to save") @@ -306,7 +306,7 @@ func reload_backup_file(project_path : String, backup_path : String) -> void: if project_path != backup_path: current_save_path = project_path - Global.window_title = project_path.get_file() + " - Pixelorama(*)" + Global.window_title = project_path.get_file() + " - Pixelorama(*) " + Global.current_version Global.project_has_changed = true Global.notification_label("Backup reloaded") diff --git a/src/Main.gd b/src/Main.gd index 177ec9b11..70faeade6 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -160,7 +160,7 @@ func _ready() -> void: Global.left_color_picker.get_picker().move_child(Global.left_color_picker.get_picker().get_child(0), 1) Global.right_color_picker.get_picker().move_child(Global.right_color_picker.get_picker().get_child(0), 1) - Global.window_title = "(" + tr("untitled") + ") - Pixelorama" + Global.window_title = "(" + tr("untitled") + ") - Pixelorama " + Global.current_version Global.layers[0][0] = tr("Layer") + " 0" Global.layers_container.get_child(0).label.text = Global.layers[0][0] diff --git a/src/UI/Dialogs/AboutDialog.gd b/src/UI/Dialogs/AboutDialog.gd index 7cc62ee48..a97003f33 100644 --- a/src/UI/Dialogs/AboutDialog.gd +++ b/src/UI/Dialogs/AboutDialog.gd @@ -40,8 +40,7 @@ func _ready() -> void: func _on_AboutDialog_about_to_show() -> void: - var current_version : String = ProjectSettings.get_setting("application/config/Version") - window_title = tr("About Pixelorama") + " " + current_version + window_title = tr("About Pixelorama") + " " + Global.current_version var groups_root := groups.create_item() var developers_button := groups.create_item(groups_root) diff --git a/src/UI/Dialogs/ImportSprites.gd b/src/UI/Dialogs/ImportSprites.gd index 2040c8b1c..5c7b671cc 100644 --- a/src/UI/Dialogs/ImportSprites.gd +++ b/src/UI/Dialogs/ImportSprites.gd @@ -142,7 +142,9 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void: Global.canvas = Global.canvases[Global.canvases.size() - 1] Global.canvas.visible = true - Global.window_title = first_path.get_file() + " (" + tr("imported") + ") - Pixelorama" + Global.window_title = first_path.get_file() + " (" + tr("imported") + ") - Pixelorama " + Global.current_version + if Global.project_has_changed: + Global.window_title = Global.window_title + "(*)" var file_name := first_path.get_basename().get_file() var directory_path := first_path.get_basename().replace(file_name, "") Global.export_dialog.directory_path = directory_path diff --git a/src/UI/Dialogs/SplashDialog.gd b/src/UI/Dialogs/SplashDialog.gd index fa7c6f970..7f480a8d1 100644 --- a/src/UI/Dialogs/SplashDialog.gd +++ b/src/UI/Dialogs/SplashDialog.gd @@ -11,9 +11,8 @@ onready var gold_placeholder_label : Label = $"Contents/MarginContainer/Info/Spo func _on_SplashDialog_about_to_show() -> void: if Global.config_cache.has_section_key("preferences", "startup"): show_on_startup_button.pressed = !Global.config_cache.get_value("preferences", "startup") - var current_version : String = ProjectSettings.get_setting("application/config/Version") - window_title = "Pixelorama" + " " + current_version - changes_label.text = current_version + " " + tr("Changes") + window_title = "Pixelorama" + " " + Global.current_version + changes_label.text = Global.current_version + " " + tr("Changes") art_by_label.text = tr("Art by") + ": Erevos" if "zh" in TranslationServer.get_locale():