Skip to content

Commit

Permalink
Fix numerous zoom-related problems
Browse files Browse the repository at this point in the history
that's cards in project n°4, and issue #78 (also it's mentionned in #54 and others)

- scrollbars change their capacity/size to match the zoom level so we can scroll with zoomed images
- the minimap is now produced with quite different methods to take into account the zoom level
- the minimap button now shows a translatable label which is updated when the user changes the active tab
- the coordinates used by the tools to draw are now correct according to the zoom level
  • Loading branch information
maoschanz committed Sep 8, 2019
1 parent 06102bc commit 8ed39d0
Show file tree
Hide file tree
Showing 14 changed files with 411 additions and 312 deletions.
1 change: 1 addition & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ src/bottombar.py
src/headerbar.py
src/image.py
src/main.py
src/minimap.py
src/preferences.py
src/properties.py
src/utilities.py
Expand Down
3 changes: 1 addition & 2 deletions po/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,10 @@ msgstr ""
"Zuschneiden, Drehen, usw. Bilder zu zeichnen oder zu bearbeiten."

#: data/com.github.maoschanz.drawing.appdata.xml.in:37
#, fuzzy
msgid ""
"Version 0.4.4 features several minor bug fixes, and various new translations."
msgstr ""
"Die Version 0.4.2 enthält mehrere kleine Fehlerbehebungen und verschiedene "
"Die Version 0.4.4 enthält mehrere kleine Fehlerbehebungen und verschiedene "
"neue Übersetzungen."

#: data/com.github.maoschanz.drawing.appdata.xml.in:43
Expand Down
61 changes: 34 additions & 27 deletions po/drawing.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: drawing\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-05 23:30+0200\n"
"POT-Creation-Date: 2019-09-08 03:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -19,7 +19,7 @@ msgstr ""

#: data/com.github.maoschanz.drawing.desktop.in:3
#: data/com.github.maoschanz.drawing.appdata.xml.in:14 src/main.py:133
#: src/window.py:438
#: src/window.py:439
msgid "Drawing"
msgstr ""

Expand All @@ -39,7 +39,7 @@ msgstr ""

#: data/com.github.maoschanz.drawing.desktop.in:18 src/ui/app-menus.ui:9
#: src/ui/app-menus.ui:70 src/ui/shortcuts.ui:16 src/ui/win-menus.ui:32
#: src/window.py:798
#: src/window.py:799
msgid "New Window"
msgstr ""

Expand Down Expand Up @@ -157,7 +157,7 @@ msgstr ""
#: src/ui/headerbar.ui:124 src/ui/headerbar_eos.ui:157
#: src/ui/headerbar_eos.ui:170 src/ui/headerbar_eos.ui:188
#: src/ui/shortcuts.ui:113 src/ui/toolbar.ui:118 src/ui/toolbar.ui:119
#: src/window.py:900 src/window.py:920
#: src/window.py:901 src/window.py:921
msgid "Save"
msgstr ""

Expand Down Expand Up @@ -231,8 +231,8 @@ msgstr ""

#: src/ui/app-menus.ui:175 src/ui/headerbar_eos.ui:50 src/ui/selection.ui:13
#: src/ui/selection.ui:179 src/ui/selection.ui:212 src/ui/shortcuts.ui:161
#: src/ui/toolbar.ui:46 src/ui/toolbar.ui:47 src/window.py:835
#: src/window.py:983
#: src/ui/toolbar.ui:46 src/ui/toolbar.ui:47 src/window.py:836
#: src/window.py:984
msgid "Import"
msgstr ""

Expand Down Expand Up @@ -329,15 +329,15 @@ msgstr ""
msgid "Color editor by default"
msgstr ""

#: src/ui/app-menus.ui:315 src/window.py:645
#: src/ui/app-menus.ui:315 src/window.py:646
msgid "_Tools"
msgstr ""

#: src/ui/app-menus.ui:327
msgid "Previous tool"
msgstr ""

#: src/ui/app-menus.ui:334 src/window.py:747 src/window.py:750
#: src/ui/app-menus.ui:334 src/window.py:748 src/window.py:751
msgid "_Options"
msgstr ""

Expand Down Expand Up @@ -379,7 +379,7 @@ msgid "Use this editor by default"
msgstr ""

#: src/ui/headerbar.ui:38 src/ui/headerbar_eos.ui:29 src/ui/toolbar.ui:30
#: src/window.py:819 src/window.py:834
#: src/window.py:820 src/window.py:835
msgid "Open"
msgstr ""

Expand All @@ -394,7 +394,7 @@ msgstr ""
#. used by the bottom panels
#. Loading a whole file in a GtkBuilder just for this looked ridiculous,
#. so it's built from a string.
#: src/ui/panel_classic.ui:96 src/window.py:479 src/tools/abstract_tool.py:79
#: src/ui/panel_classic.ui:96 src/window.py:480 src/tools/abstract_tool.py:79
msgid "No options"
msgstr ""

Expand Down Expand Up @@ -629,6 +629,13 @@ msgstr ""
msgid "Error opening this file. Did you mean %s ?"
msgstr ""

#. This displays the zoom level, %s will be replaced with a number, while
#. %% is just the symbol '%'
#: src/minimap.py:64
#, python-format
msgid "%s%%"
msgstr ""

#: src/preferences.py:54
msgid "New images"
msgstr ""
Expand Down Expand Up @@ -737,7 +744,7 @@ msgstr ""
msgid "Development features"
msgstr ""

#: src/preferences.py:166 src/window.py:642
#: src/preferences.py:166 src/window.py:643
msgid "Opened images"
msgstr ""

Expand Down Expand Up @@ -771,8 +778,8 @@ msgstr ""
msgid "BMP images"
msgstr ""

#: src/utilities.py:153 src/window.py:819 src/window.py:833 src/window.py:899
#: src/window.py:920 src/window.py:983 src/tools/ui/tool_crop.ui:27
#: src/utilities.py:153 src/window.py:820 src/window.py:834 src/window.py:900
#: src/window.py:921 src/window.py:984 src/tools/ui/tool_crop.ui:27
#: src/tools/ui/tool_crop.ui:126 src/tools/ui/tool_filters.ui:28
#: src/tools/ui/tool_filters.ui:204 src/tools/ui/tool_rotate.ui:20
#: src/tools/ui/tool_rotate.ui:204 src/tools/ui/tool_scale.ui:27
Expand All @@ -798,64 +805,64 @@ msgid "Failed to load tool: %s"
msgstr ""

#. XXX broken if a new image is opened
#: src/window.py:617
#: src/window.py:618
msgid "Middle click to get controls, press 'Escape' to exit."
msgstr ""

#: src/window.py:791
#: src/window.py:792
#, python-format
msgid "Loading %s"
msgstr ""

#: src/window.py:797
#: src/window.py:798
msgid "New Tab"
msgstr ""

#: src/window.py:799
#: src/window.py:800
msgid "Discard changes"
msgstr ""

#: src/window.py:801 src/window.py:901
#: src/window.py:802 src/window.py:902
#, python-format
msgid "There are unsaved modifications to %s."
msgstr ""

#: src/window.py:803
#: src/window.py:804
#, python-format
msgid "Where do you want to open %s?"
msgstr ""

#: src/window.py:818
#: src/window.py:819
msgid "Open a picture"
msgstr ""

#: src/window.py:840
#: src/window.py:841
msgid "these files"
msgstr ""

#: src/window.py:841
#: src/window.py:842
#, python-format
msgid "What do you want to do with %s?"
msgstr ""

#: src/window.py:891 src/window.py:922
#: src/window.py:892 src/window.py:923
msgid "Untitled"
msgstr ""

#. Context: the sentence "There are unsaved modifications to %s."
#: src/window.py:893
#: src/window.py:894
msgid "this picture"
msgstr ""

#: src/window.py:898
#: src/window.py:899
msgid "Discard"
msgstr ""

#: src/window.py:919
#: src/window.py:920
msgid "Save picture as…"
msgstr ""

#: src/window.py:982
#: src/window.py:983
msgid "Import a picture"
msgstr ""

Expand Down
Loading

0 comments on commit 8ed39d0

Please sign in to comment.