From f5fe05e9ff6b1d90c0878e7ed10a0d5829977aa2 Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Sun, 18 Jul 2021 14:39:06 +0200
Subject: [PATCH] #629 - added hint that aquare images are preferred

---
 .../de/deadlocker8/budgetmaster/hints/HintService.java     | 7 ++++++-
 src/main/resources/languages/hints_de.properties           | 3 ++-
 src/main/resources/languages/hints_en.properties           | 3 ++-
 src/main/resources/templates/helpers/iconSelect.ftl        | 3 +++
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java b/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java
index 1409cc36b..e96ee9a65 100644
--- a/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java
+++ b/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java
@@ -54,7 +54,12 @@ public class HintService implements Resettable
 	@Override
 	public void createDefaults()
 	{
-		final List<String> hintKeys = List.of("hint.first.use.teaser", "hint.report.columns", "hint.template.arrow.keys", "hint.transaction.save", "hint.globalDatePicker.hotkeys");
+		final List<String> hintKeys = List.of("hint.first.use.teaser",
+				"hint.report.columns",
+				"hint.template.arrow.keys",
+				"hint.transaction.save",
+				"hint.globalDatePicker.hotkeys",
+				"hint.icon.upload.image.size");
 
 		for(String localizationKey : hintKeys)
 		{
diff --git a/src/main/resources/languages/hints_de.properties b/src/main/resources/languages/hints_de.properties
index 456fc71c8..3ac808958 100644
--- a/src/main/resources/languages/hints_de.properties
+++ b/src/main/resources/languages/hints_de.properties
@@ -6,4 +6,5 @@ hint.first.use.teaser=Neu im BudgetMaster? Sieh dir die Einführung an!
 hint.report.columns=Tipp: Du kannst die Reihenfolge der Spalten per Drag&Drop anpassen
 hint.template.arrow.keys=Tipp: Du kannst eine Vorlage mit den Pfeiltasten auswählen und mit Enter bestätigen
 hint.transaction.save=Tipp: Nutze Strg+Enter zum Speichern der Buchung
-hint.globalDatePicker.hotkeys=Tipp: Sieh dir die Tastenkombinationen für die Monatsauswahl an
\ No newline at end of file
+hint.globalDatePicker.hotkeys=Tipp: Sieh dir die Tastenkombinationen für die Monatsauswahl an
+hint.icon.upload.image.size=Tipp: Quadratische Bilder sind am besten geeignet
diff --git a/src/main/resources/languages/hints_en.properties b/src/main/resources/languages/hints_en.properties
index 464aa7bd7..1eb9d1fe5 100644
--- a/src/main/resources/languages/hints_en.properties
+++ b/src/main/resources/languages/hints_en.properties
@@ -6,4 +6,5 @@ hint.first.use.teaser=New to BudgetMaster? Check out the first use guide!
 hint.report.columns=Hint: You can change the order of the columns by drag&drop
 hint.template.arrow.keys=Hint: You can select a template by using the arrow keys and confirm with enter
 hint.transaction.save=Hint: Use Ctrl+Enter to save the transaction
-hint.globalDatePicker.hotkeys=Hint: Have a look at the hotkeys for month selection
\ No newline at end of file
+hint.globalDatePicker.hotkeys=Hint: Have a look at the hotkeys for month selection
+hint.icon.upload.image.size=Hint: Square images will be best choice
diff --git a/src/main/resources/templates/helpers/iconSelect.ftl b/src/main/resources/templates/helpers/iconSelect.ftl
index 72b60b11a..cf157c541 100644
--- a/src/main/resources/templates/helpers/iconSelect.ftl
+++ b/src/main/resources/templates/helpers/iconSelect.ftl
@@ -135,6 +135,9 @@
             </div>
         </div>
     </form>
+
+    <#assign hint=helpers.getHintByLocalizationKey("hint.icon.upload.image.size")/>
+    <@header.hint hint=hint/>
 </#macro>
 
 <#macro progressIndicator>
-- 
GitLab