Skip to content

Commit

Permalink
Move/size tool: add permanent "lock aspect ratio" control
Browse files Browse the repository at this point in the history
Relates to #342.  Thank you to @gt-nik for this suggestion!

This new checkbox allows you to permanently lock aspect ratio when resizing layers.  The setting locks aspect ratio both when resizing the layer on-canvas (by mouse-dragging), or when using the layer size spin controls.

This setting is also persistent across sessions, but note that invoking some menu commands (e.g. `Layer > Size > Fit to Image`) will forcibly turn the setting off.  This is because certain resize operations don't work unless they are allowed to set width/height independently (like fitting a layer to an arbitrary parent image size!)
  • Loading branch information
tannerhelland committed Nov 9, 2020
1 parent 80ca881 commit 3b74576
Show file tree
Hide file tree
Showing 17 changed files with 231 additions and 92 deletions.
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/French.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>fr-FR</langid>
<langname>Français</langname>
<langversion>6.7.517</langversion>
<langversion>6.7.518</langversion>
<langstatus>Complete</langstatus>

<author>Jean Jacques Piedfort (orig. Frank Donckers)</author>
Expand Down Expand Up @@ -11558,6 +11558,11 @@ Vous pouvez alors si besoin

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>transformer la qualité</translation>
Expand Down Expand Up @@ -11643,7 +11648,7 @@ Vous pouvez alors si besoin
<translation>Rendre les transformations de calque en cours (taille, angle et cisaillement) permanentes. Cette action n'est jamais requise, mais si le rendu de la fenêtre d'affichage est lent, cela peut améliorer les performances.</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13263,10 +13268,10 @@ Si vous choisissez de désactiver les mises à jour, n'oubliez pas de visiter ph

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/German.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>de-DE</langid>
<langname>Deutsch (DE)</langname>
<langversion>9.0.149</langversion>
<langversion>9.0.150</langversion>
<langstatus>Up-to-date</langstatus>

<author>rk (ehem. Frank Donckers, Helmut Kuerbiss)</author>
Expand Down Expand Up @@ -11550,6 +11550,11 @@ Für diese Unannehmlichkeit möchte ich mich wirklich entschuldigen, aber unglü

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>Transformationsqualität</translation>
Expand Down Expand Up @@ -11635,7 +11640,7 @@ Für diese Unannehmlichkeit möchte ich mich wirklich entschuldigen, aber unglü
<translation>Aktuelle Layer-Transformationen (Größe, Winkel und Scherung) dauerhaft machen. Diese Aktion ist nie erforderlich, aber wenn das Viewport-Rendering träge ist, kann es die Performance verbessern.</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13246,10 +13251,10 @@ Wenn Sie trotzdem Updates deaktivieren möchten, vergessen Sie nicht, photodemon

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/Indonesian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>id-ID</langid>
<langname>Indonesian</langname>
<langversion>6.6.476</langversion>
<langversion>6.6.477</langversion>
<langstatus>Complete</langstatus>

<author>Ari Sohandri Putra (7.0 updates by Google Translate)</author>
Expand Down Expand Up @@ -11552,6 +11552,11 @@ I memohon maaf di atas kesulitan ini, tetapi malangnya tiada apa %2 boleh lakuka

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>mengubah kualitas</translation>
Expand Down Expand Up @@ -11637,7 +11642,7 @@ I memohon maaf di atas kesulitan ini, tetapi malangnya tiada apa %2 boleh lakuka
<translation>Buat lapisan saat ini berubah (ukuran, sudut, dan geser) permanen. Tindakan ini tidak pernah diperlukan, namun jika viewport rendering lamban, ini bisa meningkatkan kinerja.</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13248,10 +13253,10 @@ Jika anda masih memilih untuk melumpuhkan Perbarui, jangan lupa untuk mengunjung

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/Italian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>it-IT</langid>
<langname>Italiano</langname>
<langversion>8.0.28</langversion>
<langversion>8.0.29</langversion>
<langstatus>Completa</langstatus>

<author>GioRock (8.0 updates by DeepL.com)</author>
Expand Down Expand Up @@ -11559,6 +11559,11 @@ Mi scuso per l'inconveniente, ma purtroppo non c'è nulla che %2 può fare a rig

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>trasformare la qualità</translation>
Expand Down Expand Up @@ -11644,7 +11649,7 @@ Mi scuso per l'inconveniente, ma purtroppo non c'è nulla che %2 può fare a rig
<translation>Rendere permanenti le trasformazioni dello livello di corrente (dimensione, angolo e taglio). Questa azione non è mai richiesta, ma se la resa del viewport è lenta, può migliorare le prestazioni.</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13255,10 +13260,10 @@ Se si sceglie ancora di disabilitare gli aggiornamenti, non dimenticate di visit

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/Macedonian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>mk-MK</langid>
<langname>македонски</langname>
<langversion>1.0.330</langversion>
<langversion>1.0.331</langversion>
<langstatus>incomplete</langstatus>

<author>Бобан Ѓерасимоски</author>
Expand Down Expand Up @@ -11546,6 +11546,11 @@ I Искрено се извинуваме за оваа ситуација, н

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>трансформира квалитет</translation>
Expand Down Expand Up @@ -11631,7 +11636,7 @@ I Искрено се извинуваме за оваа ситуација, н
<translation>Направете тековната преобразува слој (големина, агол, и смолкнување) трајна. Оваа акција не е потребно, но ако гледиштето рендерирање е бавен, тоа може да се подобри перформанси.</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13242,10 +13247,10 @@ If сеуште изберете да го исклучите ажурирања

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/Master/MASTER.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>en-US</langid>
<langname>English (US) - MASTER COPY</langname>
<langversion>8.9.152</langversion>
<langversion>8.9.163</langversion>
<langstatus>Automatically generated from PhotoDemon's source code</langstatus>

<author>Tanner Helland</author>
Expand Down Expand Up @@ -11487,6 +11487,11 @@ I sincerely apologize for this inconvenience, but unfortunately there is nothing

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation></translation>
Expand Down Expand Up @@ -11572,7 +11577,7 @@ I sincerely apologize for this inconvenience, but unfortunately there is nothing
<translation></translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13169,10 +13174,10 @@ If you still choose to disable updates, don't forget to visit photodemon.org fro

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/Polish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>pl-PL</langid>
<langname>Polski</langname>
<langversion>8.0.37</langversion>
<langversion>8.0.38</langversion>
<langstatus>Complete</langstatus>

<author>Ryszard</author>
Expand Down Expand Up @@ -11548,6 +11548,11 @@ Przepraszamy za tę niedogodność, ale niestety %2 nie może nic zrobić ze sk

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>Tryb przekształcania</translation>
Expand Down Expand Up @@ -11633,7 +11638,7 @@ Przepraszamy za tę niedogodność, ale niestety %2 nie może nic zrobić ze sk
<translation>Przekształcanie stałej bieżącej warstwy (wielkość, kąt i nachylenie). Ta akcja nie jest konieczna, ale jeśli renderowanie okna ekranu jest powolne, może zwiększyć wydajność.</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13239,10 +13244,10 @@ Jeśli nadal decydujesz się na wyłączenie aktualizacji, nie zapomnij odwiedzi

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
17 changes: 11 additions & 6 deletions App/PhotoDemon/Languages/Simplified_Chinese.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<langid>zh-CN</langid>
<langname>简体中文</langname>
<langversion>8.2.75</langversion>
<langversion>8.2.76</langversion>
<langstatus>完成</langstatus>

<author>ChenLin(QQ:289778005)</author>
Expand Down Expand Up @@ -11542,6 +11542,11 @@ I sincerely apologize for this inconvenience, but unfortunately there is nothing

<!-- Toolpanel_Measure.frm contains 15 phrases. 10 were duplicates of existing phrases, so only 5 new phrases were written to file. -->

<phrase>
<original>lock aspect ratio</original>
<translation></translation>
</phrase>

<phrase>
<original>transform quality</original>
<translation>转换质量</translation>
Expand Down Expand Up @@ -11627,7 +11632,7 @@ I sincerely apologize for this inconvenience, but unfortunately there is nothing
<translation>使当前图层变换(大小,角度和剪切)永久性的。这个动作是从来没有必需的,但如果视渲染是呆滞,它可以提高性能。</translation>
</phrase>

<!-- Toolpanel_MoveSize.frm contains 27 phrases. 10 were duplicates of existing phrases, so only 17 new phrases were written to file. -->
<!-- Toolpanel_MoveSize.frm contains 28 phrases. 10 were duplicates of existing phrases, so only 18 new phrases were written to file. -->

<!-- Toolpanel_Paintbrush.frm contains 8 phrases. All were duplicates of existing phrases, so no new phrases were written to file. -->

Expand Down Expand Up @@ -13234,10 +13239,10 @@ If you still choose to disable updates, don't forget to visit photodemon.org fro

<!-- Automatic text extraction complete. -->

<phrasecount>2507</phrasecount>
<phrasecount>2508</phrasecount>

<!-- As of this build, PhotoDemon contains 5102 phrases. -->
<!-- 2595 are duplicates, so only 2507 unique phrases have been written to file. -->
<!-- These 2507 phrases contain approximately 11574 total words. -->
<!-- As of this build, PhotoDemon contains 5103 phrases. -->
<!-- 2595 are duplicates, so only 2508 unique phrases have been written to file. -->
<!-- These 2508 phrases contain approximately 11577 total words. -->

</pdData>
Loading

0 comments on commit 3b74576

Please sign in to comment.