Commit Graph

67 Commits (4e44084ef23d18f03fd64fc069af2f91502cfdff)

Author SHA1 Message Date
Isaiah Odhner 3223362074 Pan view with two finger drag on canvas 2019-12-09 22:45:49 -05:00
Isaiah Odhner e66913b317 Prevent unintended scrolling with touch 2019-12-09 22:17:57 -05:00
Isaiah Odhner 67ab194375 Make sure the history view fits on the screen 2019-12-08 20:24:51 -05:00
Isaiah Odhner e041e7afa9 Show tool icons in history view
Show more tool icons and better
2019-12-08 19:16:43 -05:00
Isaiah Odhner 9a66077570 WIP 2019-12-08 17:15:08 -05:00
Isaiah Odhner c9cd00a69d WIP on Document History dialog 2019-12-08 16:55:36 -05:00
Isaiah Odhner 3035fc290f Fix z-index for document resize ghost, and formalize z-index a bit 2019-12-07 10:12:03 -05:00
Isaiah Odhner 64c435018d Draw selection and textbox contents under the grid
This also makes the contents visible only within the canvas bounds, which matches mspaint.
2019-12-05 16:26:49 -05:00
Isaiah Odhner 87f738d685 Fix main canvas usability around handles 2019-12-04 22:39:47 -05:00
Isaiah Odhner 68e5f9d0f1 Make handle grab areas not overlap 2019-12-04 21:51:25 -05:00
Isaiah Odhner 270ccee7fa Disable textbox focus outline 2019-12-04 15:06:12 -05:00
Isaiah Odhner 9a5132fbfa Allow dragging textbox 2019-12-04 15:06:12 -05:00
Isaiah Odhner 5e952a7765 Fix textarea usability around handles
But not like Windows 7 Paint - better!
2019-12-04 14:41:40 -05:00
Isaiah Odhner 74db55a86c Make handles way easier to grab
Like in Windows 7 Paint
2019-12-04 14:41:40 -05:00
Isaiah Odhner 27df7e6b41 Make it work with magnification 2019-12-04 11:26:23 -05:00
Isaiah Odhner d3f1ce9fb6 WIP: make Text tool WYSIWYG! 2019-12-04 11:26:23 -05:00
Isaiah Odhner 377ddb6a2e WIP 2019-12-02 11:15:55 -05:00
Isaiah Odhner 599395be94 Reorder image-rendering values
It's generally better to have vendor prefixes earlier, and I specifically want pixelation.
2019-11-05 07:17:17 -05:00
Isaiah Odhner 622f9f8dda Blend swatch border with swatch color
Make the border go on top of the swatches so it blends with them and doesn't just create an ugly gray around them.
(It especially looked bad on the orange in the corner, which is around the same perceptive brightness as the gray.)
2019-10-27 14:38:15 -04:00
Isaiah Odhner 38a16604cd Improve modern theme
- Use modern sprites for tool icons and transparency options
- Use modern selection color for tool options
- Add a border around the canvas area to separate the canvas from the UI
- Slightly round the corners of the color wells and selected colors
2019-10-27 14:24:10 -04:00
Isaiah Odhner 4d84d55080 Make body background same as background_color 2019-10-27 00:35:06 -04:00
Isaiah Odhner 1501b6a6a4 Abut them buttons! 2019-10-21 13:28:12 -04:00
Isaiah Odhner a98cf0f473 Clean up and disable vertical text button 2019-10-21 13:10:55 -04:00
Isaiah Odhner 779eacf7ee Make window close buttons accessible in small viewports 2019-10-18 20:51:37 -04:00
Christian Liebel b051c2b6c9 Assign high z-index to popups instead of menu bar 2019-10-18 20:51:36 -04:00
Isaiah Odhner 61b22adbc6 Redesign layout of About Paint
Move the View Project News button into the header row.
2019-10-10 12:19:20 -04:00
Isaiah Odhner aed00ce022 WIP no relayout on load 2019-10-10 11:23:51 -04:00
Isaiah Odhner b6cf2e0289 Make news window max size smaller
This way it highlights the news at the top more, gives it more importance.
2019-10-10 00:42:53 -04:00
Isaiah Odhner 4b074f6cc4 Move news styles into `#news > style`
This way it'll use the CSS defined for the HTML its using.
2019-10-10 00:11:11 -04:00
Isaiah Odhner 5d7d135ed8 View Project News from Help > About Paint 2019-10-09 23:34:21 -04:00
Isaiah Odhner ad4e5c7cad Disable antialiasing consistently for selections 2019-10-02 13:43:16 -04:00
Isaiah Odhner 6ac691e9bd Avoid antialiasing in more scenarios
Enable aliasing (nearest neighbor scaling) for more scenarios. This improves quality at some scales of the canvas and device pixel ratios, by re-enabling aliasing. In particular this avoids a browser bug in chrome where the canvas will jump back and forth between being antialiased and aliased, but only for these certain scenarios. Any time it's antialiased, it can also exhibit this bug in chrome.
2019-09-30 19:50:48 -04:00
Isaiah Odhner 0421882eaf Save undos/redos as ImageData & fix Free-Form Select
- (PARTIALLY avoid a browser bug in chrome. When you zoom to a non-integer scale, there's this weird quantum antialiasing due to the canvas having a backing store which is higher density than the canvas's logical pixels (and redraw regions come into play as well). Switching to storing ImageData instead of canvases for undos/redos doesn't eliminate much of this problem, but it avoids having the undos/redos also store some high-DPI state and thereby SOMETIMES restore a state of whether antialiasing is happening or not. So it's a little less weird now, but it doesn't really solve that bugginess.)
- Protect against data loss when running low on memory. The browser (chrome at least) can clear canvases when low on memory. If the data is erased, and you undo, or do anything to the canvas, jspaint saves over the autosave. Ideally there should be multiple autosaves, but for now this is catastrophic in terms of data loss. Using ImageData instead of canvases, hopefully the browser is less willing to destroy this data, since it's more like a plain data structure in your program, and you would hope it wouldn't just delete arbitrary data in your program. A crash should be better than losing the canvas data (undos/redos) because in that case the autosave should still be in tact, altho this doesn't protect against the case where the main canvas is cleared by the browser, and then you do something to interact with the canvas other than undo/redo, and then either the page crashes or you refresh, and the autosave will still be gone.
- Behavior change or Regression: Now if the document is transparent, but the document mode is opaque, and you paste something larger than the canvas, it'll keep the transparency in the area of the original document, because it's using putImageData instead of drawImage.
- Regression: When you choose Opaque in the Image > Attributes... it no longer makes the document opaque because it's using putImageData instead of drawImage.
- Fix: Rewrite the Free-Form Select's temporary shape preview to use a proper layer instead of abusing the undo stack. This reduces the number of undo states created, and should make it easier to implement passive selections in the future. (Selections shouldn't create an undo state until you start dragging them.) This should also fix a bug in multiplayer where "inverty brush" could be left behind.
2019-09-30 19:50:48 -04:00
Isaiah Odhner 2a5206a2c5 Enable antialiasing at awkward pixel sizes
Compromise for https://github.com/1j01/jspaint/issues/103

Note that this uncovers weird buggy browser behavior where canvas HiDPI state is remembered per undo state, and can fluctuate based on mouse presses (often makes it go antialiased) and undoing (often makes it go aliased), and it can even go partially antialiased, in redraw regions as you paint.

Also it definitely needs additional handling for the canvas itself, which can have a magnification factor.
2019-09-29 22:04:20 -04:00
Isaiah Odhner 2b9486c9af Stop trying to disable font smoothing
https://github.com/1j01/jspaint/issues/130
2019-09-21 13:42:14 -04:00
Isaiah Odhner cb4376c68c Fix lint errors and more Extras menu logic 2019-09-21 11:24:22 -04:00
Isaiah Odhner 23fee3df4d Make tool transparent mode a bool 2019-09-21 10:01:26 -04:00
Isaiah Odhner a437fafe02 Get theme switching working
with hacks
2019-07-06 16:52:35 -04:00
Isaiah Odhner fd22722f5a Set minimum window size 2018-11-16 02:34:12 -05:00
Isaiah Odhner 8c0d56b02d Add font-smooth: none
Fixes https://github.com/1j01/jspaint/issues/110

2acd9c3f1a
2018-04-21 09:09:56 +00:00
Isaiah Odhner 6c5536d560 Update About Paint 2018-01-27 18:26:10 -05:00
Isaiah Odhner 26c1b56b5f Fix z-indexing issues
(And introduce at least one, but document it)
2018-01-25 09:15:03 +00:00
Isaiah Odhner a31c2d2872 Add secret 10x zoom 2018-01-25 00:06:38 +00:00
Isaiah Odhner f645febad1 Improve storage manager
- Make the thumbnails always take up the same amount of space in the layout, so that the Remove buttons line up consistently between rows. This makes it considerably easier to remove multiple entries quickly.

- Make the thumbnails centered within said space, and link the entirety of that space to opening the item in a new tab.

- Fix target='_blank'; I probably conflated it with __proto__ etc.
2018-01-22 06:43:26 +00:00
Wei-Wei Wu 3375756dd6 Make selection border alternate white/black (#58) 2018-01-20 20:00:35 -05:00
Michael 45febc58db Fix blurry image zoom in Firefox (#60) 2018-01-20 15:29:42 -05:00
Isaiah Odhner 37bf2655ec Style Help Topics in modern theme 2018-01-11 17:46:28 -05:00
Isaiah Odhner a3bcd43f2b Show component ghosts in modern theme 2018-01-10 18:50:34 -05:00
Isaiah Odhner 80b7f7550e Make handles work in the Modern theme 2018-01-10 18:18:26 -05:00
Isaiah Odhner 01e7ba0e66 Keep "#load:" in URL until "change" event
Also move the error message for loading from a URL into a separate window, and add info about CORS
2018-01-10 01:27:54 -05:00