From 50fa262a756dd60cc54d5dd2aba992be290045ed Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 11 Jan 2020 00:29:29 +0200 Subject: [PATCH] Put default image width and height to 64, made minor changes in the About dialog and in the Chinese translation --- Changelog.md | 3 ++- Scripts/Canvas.gd | 2 +- Scripts/Dialogs/AboutDialog.gd | 2 +- Scripts/Dialogs/PreferencesDialog.gd | 8 ++++---- Scripts/Global.gd | 4 ++-- Translations/zh_TW.po | 6 +++--- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Changelog.md b/Changelog.md index a848f5a5c..1c3854cfa 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,9 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [v0.6.1] - Unreleased ### Added -- Italian translation - thanks to Marco Galli! +- Italian translation - thanks to Gaarco! - In addition to the middle mouse button, you can now use `Space` to pan around the canvas. - The ability to choose for which color the color picker does its job, the left or the right. (Issue #115) +- Default image settings are now in the Preferences - thanks to Gaarco! ### Changed - When saving a .pxo file, the file path (along with the file name) gets remembered by the Export PNG file dialog path. (Issue #114) diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index b16301e80..ac6eca65a 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -41,7 +41,7 @@ func _ready() -> void: if Global.config_cache.has_section_key("preferences", "default_fill_color"): fill_color = Global.config_cache.get_value("preferences", "default_fill_color") Global.is_default_image = !Global.is_default_image - + sprite.create(size.x, size.y, false, Image.FORMAT_RGBA8) sprite.fill(fill_color) sprite.lock() diff --git a/Scripts/Dialogs/AboutDialog.gd b/Scripts/Dialogs/AboutDialog.gd index b57fe1cc0..b995ad0af 100644 --- a/Scripts/Dialogs/AboutDialog.gd +++ b/Scripts/Dialogs/AboutDialog.gd @@ -20,11 +20,11 @@ func _ready() -> void: contributors.create_item(contributor_root).set_text(0, " Martin Zabinski") contributors.create_item(contributor_root).set_text(0, " azagaya") contributors.create_item(contributor_root).set_text(0, " Andreev Andrei") + contributors.create_item(contributor_root).set_text(0, " Gaarco") contributors.create_item(contributor_root).set_text(0, " JunYouIntrovert") contributors.create_item(contributor_root).set_text(0, " Subhang Nanduri") contributors.create_item(contributor_root).set_text(0, " danielnaoexiste") contributors.create_item(contributor_root).set_text(0, " huskee") - contributors.create_item(contributor_root).set_text(0, " Gaarco") var donors_root := donors.create_item() donors.create_item(donors_root).set_text(0, " pcmxms") diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index 04e848598..642949edb 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -52,7 +52,7 @@ func _ready() -> void: if guide is Guide: guide.default_color = Global.guide_color guide_color.color = Global.guide_color - + # Set default values for Image if Global.config_cache.has_section_key("preferences", "default_width"): var default_width = Global.config_cache.get_value("preferences", "default_width") @@ -63,7 +63,7 @@ func _ready() -> void: var default_height = Global.config_cache.get_value("preferences", "default_height") Global.default_image_height = int(default_height) default_height_value.value = Global.default_image_height - + if Global.config_cache.has_section_key("preferences", "default_fill_color"): var fill_color = Global.config_cache.get_value("preferences", "default_fill_color") Global.default_fill_color = fill_color @@ -247,7 +247,7 @@ func _on_GuideColor_color_changed(color : Color) -> void: guide.default_color = color Global.config_cache.set_value("preferences", "guide_color", color) Global.config_cache.save("user://cache.ini") - + func _on_ImageDefaultWidth_value_changed(value: float) -> void: Global.default_image_width = value Global.config_cache.set_value("preferences", "default_width", value) @@ -257,7 +257,7 @@ func _on_ImageDefaultHeight_value_changed(value: float) -> void: Global.default_image_height = value Global.config_cache.set_value("preferences", "default_height", value) Global.config_cache.save("user://cache.ini") - + func _on_DefaultBackground_color_changed(color: Color) -> void: Global.default_fill_color = color Global.config_cache.set_value("preferences", "default_fill_color", color) diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 878d5c1b3..6e583ffa6 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -26,9 +26,9 @@ var theme_type := "Dark" # warning-ignore:unused_class_variable var is_default_image := true # warning-ignore:unused_class_variable -var default_image_width := 32 +var default_image_width := 64 # warning-ignore:unused_class_variable -var default_image_height := 32 +var default_image_height := 64 # warning-ignore:unused_class_variable var default_fill_color := Color(0, 0, 0, 0) # warning-ignore:unused_class_variable diff --git a/Translations/zh_TW.po b/Translations/zh_TW.po index 89e3826b5..14ff23160 100644 --- a/Translations/zh_TW.po +++ b/Translations/zh_TW.po @@ -186,7 +186,7 @@ msgid "Trilinear" msgstr "三線性" msgid "Language" -msgstr "語言:" +msgstr "語言" msgid "Themes" msgstr "皮膚" @@ -195,7 +195,7 @@ msgid "Guides & Grid" msgstr "輔助線與格線" msgid "Language options" -msgstr "語言:" +msgstr "語言" msgid "Theme options" msgstr "格線設定" @@ -207,7 +207,7 @@ msgid "Color:" msgstr "顏色:" msgid "Guide color:" -msgstr "輔助線顏色" +msgstr "輔助線顏色:" msgid "System Language" msgstr "系統語言"