hundredrabbits / Dotgrid

Minimalist Vector Tool
https://hundredrabbits.itch.io/dotgrid
Other
1.04k stars 75 forks source link

Allow copy/cut/paste in picker input #38

Closed pacocoursey closed 6 years ago

pacocoursey commented 6 years ago

The global event listeners for copy, cut, and paste were preventing these actions inside of the picker input field. This was particularly annoying when trying to paste a hex code.

The menu code for those actions is still a little bit redundant, but I chose to focus on fixing the problem rather than improving the code since I'm still new to this.

neauoire commented 6 years ago

Thanks for the fix :) I'll refactor, and push to Itch.io tomorrow!

pacocoursey commented 6 years ago

One other quick fix that probably isn't worth a pull request but I'll happily submit one if you want:

desktop/main.js: line 60

    else {
+       app.win.show();
    }

This shows the window when clicking the icon without the need for an extra CmdOrCtrl+H input. This is the default behavior for most macOS apps.

neauoire commented 6 years ago

Also fixed an issue with the picker color preview update on enter. And animated the picker color preview.