Commit graph

3729 commits

Author SHA1 Message Date
Mark Kim
7aa000b68a Tux Paint for macOS can localize menus (feature request #183)
Tux Paint for macOS can now localize the macOS menubar.  Translation
files (*.po) will be required for the actual translations to show.
2022-02-05 18:40:36 -05:00
Mark Kim
aa4c72d4ed macOS path handling is more robust
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.)
2022-02-05 12:12:37 -05:00
dolphin6k
8ece611f8c Corrected Japanese translation for color mixer. 2022-02-04 17:08:20 +09:00
Bill Kendrick
ab01926c27 Oops, left some debug printf() in there 2022-02-03 23:03:02 -08:00
Bill Kendrick
5203c16d34 Forgot to gettext() color mixer tip text fmt str
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.
2022-02-03 22:42:19 -08:00
Bill Kendrick
00b2751cdd Doc'ing Japanese translation update
h/t Shin-ichi
2022-02-03 22:20:51 -08:00
dolphin6k
61d8f8cee0 Japanese translation for color mixer. 2022-02-04 11:15:47 +09:00
dolphin6k
4c42cf8daa Updated Japanese translation 2022-02-04 08:55:32 +09:00
Bill Kendrick
29a4094b6e Doc'ing some of Pere's contrib's to 0.9.28 so far 2022-02-03 01:46:29 -08:00
Bill Kendrick
5ee27b3bdb Denote when Bill made changes in CHANGES.txt 2022-02-03 01:39:38 -08:00
Bill Kendrick
89809983e8 Doc'ing Win32 bindtextdomain() change by Shin-ichi 2022-02-03 01:24:15 -08:00
dolphin6k
c965c2fad2 Pass the full path of locale directory to bindtextdomain().
Workaround to the issue that gettext() can not find translation files
after the update of MinGW/MSYS2 in January 2022.
2022-02-02 22:34:30 +09:00
Bill Kendrick
c106c61214 Syncing docs for new Tile Zoom magic tool 2022-01-30 02:27:32 -08:00
Bill Kendrick
c1a5ca7fb8 New Magic tool: "Tile Zoom" 2022-01-30 02:23:01 -08:00
dolphin6k
c0bac21beb Target directory for install-dlls and install-tpconf-i18n were missing. 2022-01-28 23:35:14 +09:00
Bill Kendrick
e46226cfcc Refresh POT/PO after more Color Mixer coding 2022-01-28 02:17:26 -08:00
Bill Kendrick
964416f476 Color mixer: Showing simplified fractions, too
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".
2022-01-28 02:16:33 -08:00
Bill Kendrick
c50fddd604 Color mixer: Undo/Redo seems to be working! 2022-01-28 01:32:29 -08:00
Bill Kendrick
4ae07338bf Color mixer: Break color average calculation out
Needs to be a function that we can also call on Undo & Redo
actions.
2022-01-28 01:00:36 -08:00
Bill Kendrick
3e28289db2 Color mixer: WIP: Undo/Redo feature 2022-01-28 00:55:23 -08:00
Bill Kendrick
336c7cc342 Color mixer: Some better Red/Yellow/Blue primaries
Using HSV values of some subtractive CMYK colors.
2022-01-28 00:24:27 -08:00
Bill Kendrick
a8beb74abe Color mixer: Mixing colors properly
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.
2022-01-27 23:56:56 -08:00
Bill Kendrick
42ca74df86 Update POT/PO to add new Color Mixer UI elements 2022-01-27 22:54:50 -08:00
Bill Kendrick
4d93bd3177 Color mixer: Display color proportions as you mix
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".)
2022-01-27 22:37:13 -08:00
Bill Kendrick
150e524867 Color mixer: Undo/Redo appear properly; color tweaks
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.
2022-01-27 21:25:04 -08:00
Bill Kendrick
268d063f71 Color Mixer: Show Undo/Redo & handle cursor shape
Undo/Redo don't do anything yet. Other buttons now cause mouse
to change to 'hand' (vs 'arrow') shape when hovering over them.
2022-01-27 21:07:19 -08:00
dolphin6k
10dc17d434 Install dlls and tpconf only for the target "bdist-win32" 2022-01-28 11:15:13 +09:00
Bill Kendrick
793ee8fd50 Color mixer working okay now!
I'd like to add undo/redo, and the trash button needs a label,
but it's usable!
2022-01-27 02:39:46 -08:00
Bill Kendrick
92499d9a70 WIP More work on color mixer
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.
2022-01-27 00:08:56 -08:00
Bill Kendrick
db7a8c0124 WIP Starting to make a color mixer tool
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.
2022-01-26 22:43:06 -08:00
Bill Kendrick
ed3baefc77 Syncing docs, re: pipette shortcut (Ctrl+Click) 2022-01-26 01:18:21 -08:00
Bill Kendrick
83d316a166 Ctrl+click to pick colors immediately
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.)
2022-01-26 01:07:11 -08:00
Bill Kendrick
269f0cfe3a Rigging up do_color_sel() to offer immediate mode
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.
2022-01-26 00:20:14 -08:00
Bill Kendrick
e0d7e0728b Show "pipette"-shaped pointer when selecting colors 2022-01-25 23:57:31 -08:00
Bill Kendrick
6735340566 Stamp performance improvements
+ 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)
2022-01-25 22:21:55 -08:00
Bill Kendrick
3518433808 Better onscreen keyboard button sizing
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/
2022-01-25 00:52:14 -08:00
Bill Kendrick
3b027b9a4c Sync INSTALL docs after Mark's macOS updates 2022-01-24 23:44:23 -08:00
Mark Kim
0175773efc macOS build tweaks
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.
2022-01-22 14:46:34 -05:00
Bill Kendrick
a0231223d5 Doc sync to include macOS CMD (⌘) key support 2022-01-21 02:00:50 -08:00
Bill Kendrick
14dd0446cf Syncing INSTALL docs; grab Mark's macOS updates 2022-01-21 01:53:08 -08:00
Bill Kendrick
dffa3d8dd6 Sync docs to get Shapes aspect ratio text 2022-01-21 01:48:33 -08:00
Bill Kendrick
be7d33fa23 Mend broken star shape fill
Was missing some array elements (but no warnings!?)
h/t Shin-ichi for catching it
2022-01-21 01:38:25 -08:00
Bill Kendrick
251259ab13 PO/POT update after adding shape + aspect ratio tip 2022-01-21 01:33:45 -08:00
Bill Kendrick
16e7cb1f59 Showing aspect ratio of shapes when stretching them
...in the Tux tips area
2022-01-21 01:33:23 -08:00
Bill Kendrick
9f5769855b PO/POT update after adding heptagon 2022-01-21 00:34:33 -08:00
Bill Kendrick
71c2404838 Added heptagon (7-sided) shape
Also, using floats more, allowing for proper heptagon support, as
well as a non-skewed starting angle for octagons (22.5 degrees).
2022-01-21 00:34:10 -08:00
Bill Kendrick
1050e74336 PO/POT refresh after adding hexagon shape tool 2022-01-21 00:02:44 -08:00
Bill Kendrick
e210f5592c Add "hexagon" to shapes tool
How'd we last so long without one!?
2022-01-21 00:01:50 -08:00
Mark Kim
e5faf36d5d macOS script to build the universal app bundle.
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.
2022-01-20 21:28:59 -05:00
Mark Kim
c239e849cb Correct comment 2022-01-20 20:46:18 -05:00