Onscreen keyboard repositions itself to the top if you use [Enter]
to move the cursor down, and it begins overlapping the keyboard.
Also, play "carriage return" sound effect, even when entering
a blank 'line' of text.
Fixed the issue with the backspace not working in text and label tools
when in certain language modes in macOS. Mac keyboards have the DELETE
key where PC keyboards have the BACKSPACE key, and the two keys have
different keycodes, so the backspace requires special handling on the
macOS in programs writtens for the PC.
Avoid leaking memory when loading Label text strings from a saved drawing.
Also, a heck of a lot of comments to explain (as best I understand)
what load_info_about_label_surface() is doing.
Starting work towards
https://sourceforge.net/p/tuxpaint/feature-requests/213/
The ability to 'apply' a label to the canvas, making it permanent
(as if added using the "Text" tool instead).
Removed unused "label rotate" option's code (and hence addressed
a bug we didn't relalize when choosing the "Label" tool while in
in "--nostampcontrols" mode; the unused "rotate" button would appear).
Show tips when choosing brushes, to remind the user when they
are animated, and or rotational/directional.
Show tips when brush spacing is changed, specifying the approximate
spacing. Output is fuzzy, to avoid being overly technical (e.g., it
will never say "2 345/1000 times as big as" or "1/103 the size of")
Occasionally running Tux Paint in Korean, Japanese, and possibly other
languages would cause Tux Paint to crash. This commit fixes it.
This bug was previously mentioned as the possible cause of these
previously reported crashes, though they were determined to be
unrelated:
https://sourceforge.net/p/tuxpaint/mailman/message/37364981/https://sourceforge.net/p/tuxpaint/mailman/message/37376574/
The cause of the crash turned out to be in the function that loads the
input method map (*.im). Some languages that use more than one
keystroke to produce one unicode character use this mapfile to track, in
a state machine, what keys have been pressed and what unicode character
should be output. This state machine's memory is increased dynamically
as needed when the input method map file is loaded. There was a line of
code that references the old memory that could have moved by the memory
increase. This line of code has been moved to prior to the memory
increase to avoid accessing memory that may have moved.
It appears the system language detection doesn't work on [some versions
of?] macOS. Fixed.
Strangely, querying the Cocoa API for the system locale on a system in
US with the preferred language set to Korean produces the invalid locale
"ko-US" instead of the expected "ko-KR". This behavior of returning the
language with a invalid region qualifier for the language appears to
happen only with languages where macOS does not have regional variants
(this issue does not seem to occur with Canadian English, en-CA, for
example.) A fuzzy matching locale function has been added to handle
this issue.
Tweaks to icon. Further modularized how color button rendering works,
so it can handle selector (pipette) and mixer overlay icons.
Mixer function is basically identical to color picker (rainbow palette)
as a placeholder. WORK IN PROGRESS.
Also, modularize color picker's & color selector's method of
generating a fresh version of their active/inactive buttons,
after a color has been chosen by their tool.
A keyboard shortcut is now available for picking colors from
the canvas more quickly. Hold either (left or right) [Ctrl] key
while clicking, and the color selector option will appear.
Release the mouse button over a color on the canvas to choose it
(or outside the canvas to abort).
Closes https://sourceforge.net/p/tuxpaint/feature-requests/209/
Also,
* Don't play 'bubble' paint sound when color picker or selector
are aborted (e.g., via their "Back" buttons).
* Replace many instances of "NUM_COLOR - 1" and "NUM_COLOR - 2"
(which correspond to color chose via picker (palette) and
selector (canvas), respectively) with #define's that
represent them. (Avoid magic numbers.)
The pick-a-color-from-the-canvas color selection feature
(the option in the color palette showing a pipette icon)
has been extended to support an immediate mode (return on
"mouse-up" event, don't show a "Back" button, and don't animate
the appearance of the color dialog at the bottom),
which will be used by a forthcoming feature that will offer
a keyboard shortcut to bring up this color selection option.
+ Stamps are scaled before they are colorized or tinted,
to increase performance.
+ The current stamp (in its current form: size, orientation,
and color) is cached, so it may be applied to the canvas
many times without having to re-render.
(No longer scaling and tinting every time you click.)
Closes https://sourceforge.net/p/tuxpaint/bugs/147/
(h/t Andre Anckaert)
No longer restricted to "the same as other UI buttons"
(e.g., 48x48 default) or "1/4th that size" (e.g., 24x24).
Will scale, allowing for larger buttons when appropriate.
h/t Anat Caspi for pointing out the continuing issue.
Closes https://sourceforge.net/p/tuxpaint/feature-requests/212/