- Fix the contrast of (most) tool options in the new dark theme
- (There isn't very good contrast for the shape style options in this dark theme.)
- Simplify events for re-rendering tool options
- Re-render tool options when dropping in a .theme/.themepack file
"Invert Selection" was ambiguous, could mean selecting the opposite set of pixels.
"Rotate 90 degrees Selection" was ungrammatical.
I could template the names so that it was "Invert Selection Colors", "Rotate Selection 90 degrees", but for now, putting parentheses around "Selection" works fine.
`cancel()` inside `undoable()` action callback caused it to navigate history,
and it would navigate all the way to the start of the last pointer gesture because
`history_node_to_cancel_to` was only set on pointerdown, not taking into account non-pointer-gesture operations.
The point was to allow undoing Fill With Color when canceling, but with the old definition of `history_node_to_cancel_to` it would have needed to be set in scattered places.
Now I'm defining it where it can be null, and if it's null, canceling should just go back to the history node at the start of `cancel()` (after making history nodes if applicable by telling tools to finish).
- Remove the whole ugly hacky module. Most things only modify the canvas when creating undoables now. Only a few things modify undoables after creating them.
- Formally disable pointer operations playback, instead of just leaving it accidentally disabled.
- Instead of creating an OnCanvasTextbox or OnCanvasSelection object during selection, draw the preview in the tool
- Get it looking exactly like it does in mspaint (as far as I can tell)
- Fix how selection rect is determined
- Don't create textbox or selection if width or height would be 1
- Don't draw unless the pointer has moved
$ lebab --replace src/ --transform let
src/$Component.js:
59: warning Unable to transform var (let)
60: warning Unable to transform var (let)
97: warning Unable to transform var (let)
138: warning Unable to transform var (let)
src/$Window.js:
74: warning Unable to transform var (let)
src/app.js:
662: warning Unable to transform var (let)
460: warning Unable to transform var (let)
612: warning Unable to transform var (let)
613: warning Unable to transform var (let)
614: warning Unable to transform var (let)
src/functions.js:
756: warning Unable to transform var (let)
src/image-manipulation.js:
245: warning Unable to transform var (let)
826: warning Unable to transform var (let)
src/imgur.js:
48: warning Unable to transform var (let)
173: warning Unable to transform var (let)
- Always use screen pixel scale for helper layer
- Move responsibility for non-integer handling into draw_grid (instead of using an integer scale for the whole helper layer)
- This allows the Magnifier viewport preview and Eraser preview to draw with a consistent line width
- TODO: Try applying sub-1px margin or padding or left/top or translate or something to canvas-area to get helper layer canvas to line up with screen pixels perfectly