When looking up paths of fonts, preferences, etc., macOS searches two
places, the system paths and the user paths under $HOME.
This change handles rare scenario where HOME is not set. If HOME is not
set, now the application just searches the system path twice instead of
searching the system path followed by going into an undefined behavior
(possibly segfault.)
Forgot to wrap the color mixer's tip text printf() format string
in gettext(), which caused the static part of the text
("Your color is...") to not be translated. h/t to Shin-ichi for
pointing it out.
Say a color is a mix of 5 red, 4 blue, and 1 black.
It will show "5/10 (1/2) red, 4/10 (2/5) blue, 1/10 black."
Also, when adding multiple contributions of only one color (so far),
it will say, e.g., "entirely (3/3) red".
Rather than having a "current color" and averaging it with
the newly-added color, averaging the entire set of colors each time.
Before, if you added R + Y + B, you'd get a different color
than R + B + Y, or Y + B + R, etc.
Now, it starts fresh every time and averages the hues (when applicable),
saturations, and values of each color that's been added to the mix.
R + Y + B (combined in any order) currently always comes out a brownish
orange, as expected.
Show the color proportions (e.g., "entirely red", or "1/2 yellow and 1/2 green",
or "1/5 red, 2/5 blue, and 2/5 black") in the Tux tips area. Show the full
instructions again when the color is reset with the clear button.
(Also, label clear (trash) button with the word "Clear".)
Adjust HSV values for Red/Yellow/Blue. When drawing color,
drop V value very slightly (so white appears off-white).
Undo & Redo now have black icons/text if available, else grey.
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/
1. Building the DMG file now requires explicitly calling the 'make
TuxPaint.dmg' target.
2. Messages output after completing a Makefile target has been
customized on macOS.
The motivation here is Apple Silicon. With the instruction of Apple
Silicon, the porting developer may need to sign the app bundle and/or
create the app bundle as universal before creating the DMG file, so the
Makefile no longer auto-creates the DMG file. Instead, macOS-specific
messages have been added so the developer knows what to do next.
1. Build TuxPaint.app on Intel macOS, rename it TuxPaint-x86_64.app.
2. Build TuxPaint.app on Apple Silicon macOS, rename it TuxPaint-arm64.app.
3. Copy TuxPaint-x86_64.app to the same directory as TuxPaint-arm64.app
on the Apple Silicon macOS, then run:
macos/build-universal.sh TuxPaint-x86_64.app TuxPaint-arm64.app
... to produce TuxPaint.app that's universal.
4. `make TuxPaint.dmg` to produce TuxPaint.dmg from the universal
TuxPaint.app.