Commit Graph

10 Commits

Author SHA1 Message Date
92e9d994fe modifiers: Support Control and Alt
Control and Alt are special in that they aren't expected to switch levels, and so don't need to change what characters are output.

Use in layouts by adding `modifier: Control` or `modifier: Alt` in place of `text: "foo"`.

The latching of the modifier will force the keyboard to emit raw key presses and prevent it from outputting text.
2020-02-28 11:21:07 +00:00
10178d204b Merge remote-tracking branch 'upstream/master' into center 2020-02-05 10:32:07 +00:00
416bc6163e drawing: Generalized foreach_visible_button 2020-02-02 18:29:29 +00:00
40b79f6209 layout: Center views relative to each other and the layout bounds 2020-02-02 18:07:28 +00:00
500c23beec locking: Lock keys statelessly
Locking is not determined by button state any more, but rather based on the view active at the moment. If pressing/locking a key results in the current view being active, the key is active. If locking a key results in the current view, the unlock view is activated.
2020-02-02 15:41:47 +00:00
97d8dfe4cb locks: Draw based on current view 2020-02-02 14:45:33 +00:00
dd21bfed8d positioning: Calculate sizes instead of storing, move position out of widgets
Sizes of widgets can be derived, so storing them was only for C compatibility. Similar with storing position inside of widgets.

Some layout margin and scaling changes could be introduced, meaning a possibility of visual differences.
2019-12-07 21:20:21 +00:00
1f69787fac cleanup: Remove unused single frame draw 2019-12-07 17:19:49 +00:00
f77db1bb73 renderer: Render whole keyboard the same way as pressed buttons
Removed window size dependent surface.
2019-12-07 14:33:49 +00:00
f9fbd3fb2d rendering: Simplify Cairo context usage, remove unneeded calls.
Moved Cairo context usage to Rust, and rearranged ctx setup (position) to happen in one place.

Removed render calls that were overwritten on each draw call anyway.
2019-12-07 12:47:47 +00:00