Commit graph

35 commits

Author SHA1 Message Date
Ian Prest
3932c2eb57 Added '@media print' rules so that only the KB layout gets printed. 2014-05-20 20:39:00 -04:00
Ian Prest
b9ff4c651b Started implementation of rotated-cluster support.
-- Each key has a rotation angle, and center of rotation; available in
the editor.
-- Displaying crosshairs in the editor for the center of rotation.
-- Keyboard shortcuts to move CoR, and change angle.
-- Keyboard height is correctly calculated.
TODO:
-- Serialization is still wonky.
-- Can't click on rotated keys to select them.
2013-11-12 22:56:41 -05:00
Ian Prest
789a5ba6c6 Formatting tweak to shortcut keys.
-- Make key text monospaced.
2013-11-10 15:28:25 -05:00
Ian Prest
e075ee3ad3 Fix rendering of profiles on non-rectangular keys.
-- Now setting background-size & background-position properties on the
keycap foregrounds (which are the elements that have gradients applied).
-- Now, instead of each section getting its own gradient, they each get
the *same* gradient... so when they are laid on top of each other, the
gradients match.
-- This is just about perfect for DCS (cylindrical).
-- The effect is less convincing for DSA/SA caps; ideally we'd be able
to "blend" the two gradients together somehow, but CSS doesn't support
non-normal blend-modes, and I don't want to get into <canvas> rendering.
2013-11-09 16:16:58 -05:00
Ian Prest
59336dc798 Added styles for SA profile.
-- Identical to DSA, at the moment.
2013-11-09 14:41:29 -05:00
Ian Prest
37583857bd Small change to make it less likely that the swap-colors button will overlap the color names. 2013-11-09 14:06:36 -05:00
Ian Prest
5dffa0b13d Added a button to swap the fg/bg colors of a keycap.
Also:
-- fixed colors of text to go through same lightening process as keycap
-- fixed styles for right-aligned side-printed text.
2013-11-09 13:27:40 -05:00
Ian Prest
4729175d7a Added an indication of which palette colors are being used.
-- The palette swatch will have a glyph to indicate it's the current
foreground/background color.
-- We print the color name beside the foreground/background color editor
fields.
2013-11-09 13:00:12 -05:00
Ian Prest
1494f0bbbe More accurate color handling.
1. Instead of using the specified color for the top of the cap, and then
darkening the side, I use the specified color for the sides of the cap,
and then lighten the top.
-- All swatches were sampled from the smooth part of the color chips...
and the smooth is usually present on the *side* of the caps, not the
top.
-- The top of the caps usually has a matte-finish, which is visibly
lighter than the smooth finish.

2. Lighten the color in LAB-space, instead of in RGB-space.
-- results in better appearance for the light colors

3. Tweaked the gradients for DSA and DCS.

4. Updated existing sample layouts to use SP color values.
-- Deleted old/unloved sample layouts.
-- Darkened the Stealth-Black layout to match other changes.

5. Changed the default keycap color from #eeeeee --> #cccccc
-- Relative appearance is similar between old & new versions.
2013-11-09 02:31:10 -05:00
Ian Prest
968e10bc9b Fix the side-printed labels.
-- Somewhere along the line they got moved up... moved them back down.
-- Made the DSA version 1px smaller, so that it would fit in the
available space.
2013-11-09 00:00:52 -05:00
Ian Prest
3cb7d7e7d9 Use vertical gradient for spacebars.
-- User will need to add SPACE to the Profile/Row string.
2013-11-08 23:13:41 -05:00
Ian Prest
25cca4bb2e A handful of bug fixes.
-- Line spacing was too big on the keycaps (I think it was picking up
the spacing from Bootstrap); fixed in CSS
-- DSA keys were showing the inner-border in the incorrect spot (wasn't
really noticable on the dark colors of Retro DSA); fixed in CSS
-- Replaced custom min/max functions with the correct Math.min, Math.max
functions.
-- The valiation for x/y offsets was too aggressive; for some
oddly-shaped keys, it didn't let you set values that were big enough.
-- Swapped the order of the keylabel tops for the primary & secondary
rectangles.  This ensures that the label is in the same place whether
stepped or not, at the expense of maybe affecting old layouts.
2013-10-19 16:05:53 -04:00
Ian Prest
a238243f55 Fixed a problem with the font on side-printed labels.
-- Was picking up a larger font from the other CSS rules.
2013-10-19 01:38:57 -04:00
Ian Prest
5b6472a5d8 Added support for 'stepped' keycaps. 2013-10-19 01:05:52 -04:00
Ian Prest
db272d2ca4 Added tooltips for most of the editor fields. 2013-10-18 22:17:02 -04:00
Ian Prest
6cea462ab8 Render HRs within key legend text.
We've always allowed HTML in the key text, but HRs didn't render... now
I've added styles to render the HR as a string of horizontal-line
characters (which ensures they pick up the correct text-color).
2013-10-18 20:24:15 -04:00
Ian Prest
c3429b909c Support a "secondary" legend size on our caps.
-- Primary size applies to the first cap; secondary size applies to all
other caps
-- If primary is changed, we automatically change the secondary to keep
it in sync; this is *usually* what we want.
-- Some special serialization rules to ensure we don't write out more
data than needed; same rules apply there, if primary is changed,
secondary changes.
2013-10-17 23:57:34 -04:00
Ian Prest
491ccb3c97 Support a 3rd (middle) row of text on the keycaps.
-- Germans have it rough... their caps can include a top, middle, and
bottom legend.
2013-10-17 23:17:50 -04:00
Ian Prest
70b9bbd950 Fix selection rectangle when window is scrolled.
-- Previously used "fixed" position; this is fixed to the window, so
isn't affected by scrolling, which is why it didn't work.
-- Now using "absolute" position; this is relative to the parent
element, so it *is* affected by scrolling.
-- Also had to reparent the selection rectangle so that the coordinates
were correct.
2013-10-17 23:02:28 -04:00
Ian Prest
95be097bc4 Increased number of font sizes available.
-- Used to be 1-5; is now 1-9.
-- DSA used to make size=5 *really* big.  Now that there are more sizes,
DSA no longer has any overrides (so it's back to being a linear
scale)... old size 5 ==> new size 8.
2013-10-15 23:06:32 -04:00
Ian Prest
d0ba759ddb Switched to new JSONL parser
The new parser is generated by Jison (a JS parser generator, like
Bison).
-- Modified one of the Jison samples to support our "leniency"
requirement.
-- Added a makefile to build & minify the parser.
-- The new parser also generates better error messages... but they
expect to be displayed in a console.  So I changed the error alert DIV
to use a fixed-width font.
2013-10-15 22:36:51 -04:00
Ian Prest
fb3e97be2e Tweaked the DSA radial gradient. 2013-10-14 22:19:00 -04:00
Ian Prest
1dd4612f18 Bumping up DSA large font size to be more true-to-life. 2013-10-14 21:59:45 -04:00
Ian Prest
84cf6bca7a Added the ability to specify a font size.
-- Using relative sizes within a range of 1-5, default 3.
2013-10-14 21:41:55 -04:00
Ian Prest
30839db662 Can now center text on keycaps.
-- Center in the X and/or Y directions
-- also added a sixth label (front-printed, right-justified)
2013-10-14 21:09:16 -04:00
Ian Prest
08bff7d765 Using 'Engravers Gothic' font on DSA profile.
-- As a substitute for 'Gorton Modified', which isn't available
electronically.
-- I had to license the font, so I can't add the font-files themselves
to the repository... :(
2013-10-14 18:14:53 -04:00
Ian Prest
f52b2b1a3e Added top/bottom-right text and front-printed text.
-- all labels are separated by \n's in the serialized data; now just
supporting 3 more
-- labels are now stored as an array internally
-- Fixed a bug where inserting a key would say "g:undefined"
-- Fixed a bug where you could have an invalid key selected after
editing the raw data.
2013-10-14 14:08:05 -04:00
Ian Prest
35abe57b0b Added the ability to "ghost" a keycap.
-- Ghosted keys are dimmed out
-- This is useful for drawing attention to the *unghosted* keys, while
still presenting them in context.
2013-10-09 23:21:23 -04:00
Ian Prest
48bbb3c13f Using the correct icon for "redo". 2013-09-29 21:27:33 -04:00
Ian Prest
9ebaa30d81 Use default arrow cursor on the body.
We prevent text selection, so don't use the text-selection cursor!
2013-09-29 18:06:25 -04:00
Ian Prest
1548fdea08 Added basic undo/redo support. 2013-09-29 15:50:45 -04:00
Ian Prest
9fb3e4978b Added a basic 'help' dialog. 2013-09-26 23:03:52 -04:00
Ian Prest
21f90b0499 *Really* prevent text selection. 2013-09-25 23:06:01 -04:00
Ian Prest
7574a078f9 Prevent text selection 2013-09-25 22:46:01 -04:00
Ian Prest
881a584877 initial commit 2013-09-25 20:21:59 -04:00