Commit Graph

12 Commits

Author SHA1 Message Date
tophf
e0ea76a940 colorpicker hotkey: find color at cursor in strings/comments 2017-11-24 13:19:10 +03:00
tophf
5d00602ada switch colorpicker popup format on PgUp/PgDn only, not Tab 2017-11-24 13:19:09 +03:00
tophf
fc20479ab4 correctly unhook colorpicker in usercss#stylus mode 2017-11-24 13:19:08 +03:00
tophf
2c82cc3bbc fix glitching on highlighting of current token 2017-11-24 13:19:08 +03:00
tophf
75da5c50ce colorpicker Ctrl-up/down steps in 50 on S, L, .5 on alpha 2017-11-24 13:19:07 +03:00
tophf
2a0ecec28e show color swatches in usercss with stylus preprocessor 2017-11-24 13:19:07 +03:00
tophf
aa2fef7f72 more keyboard control in colorpicker popup
hex mode similar to chrome-devtools:
* Ctrl-Up/Down for R channel
* Shift-Up/Down for G channel
* Alt-Up/Down for B channel
* Up/Down treats the entire color as a hex integer e.g. #00f -> #010

rgb/hsl modes similar to chrome-devtools:
* Ctrl-Up/Down steps by 100 (alpha: by 1)
* Shift-Up/Down steps by 10 (alpha: by .1)
* Up/Down steps by 1  (alpha: by .01)

* PgUp/PgDn to switch format
* Tab to switch format when at the first/last input field
2017-11-24 13:19:06 +03:00
tophf
b99391887d add colorpicker hotkey config icon [default: none]
* uses the last submitted color by default
* doesn't insert the default color until a change or the Enter key
* fix a few bugs in colorpicker introduced in the rewrite
2017-11-24 13:19:06 +03:00
tophf
352846c8b4 fix and update ColorView.openPopup() 2017-11-24 13:19:06 +03:00
tophf
ce8a0a2d42 assign color swatches correctly: skip overlays in the middle 2017-11-24 13:19:05 +03:00
tophf
37a62b0407 fix/rewrite/integrate colorpicker
* full rewrite of colorview.js to make it 10-100 times faster (render on demand via extendMode)
* full rewrite of colorpicker.js to simplify CSS
* automatic light/dark theme based on current color of the editor
* fixes, tweaks, speedups
* color spot will always be on the left of its text i.e. no line break on wrapping
* support #RRGGBBAA and #RGBA hex colors
* support "transparent" as rgba(0, 0, 0, 0)
* HEX/hex toggle
* fix HSLA regexp
* Esc/Enter key to close
* innerHTML -> textContent
* toggle the feature correctly
* fade out before autohiding
* always show alpha 1 like devtools does
* set cursor:pointer only on the clickable part of the sliders
* bigger color format switcher with a tooltip
* autofocus input on open, disable spellcheck
* try not to obscure the source color spot & text
* restore focus without scrolling
2017-11-20 15:19:58 +03:00
tophf
c50b251ae4 add original colorpicker plugin 2017-11-19 15:55:35 +03:00