Commit graph

15 commits

Author SHA1 Message Date
Your Name
a0d8bbd1f4 rounded corners 2025-11-06 20:37:41 +01:00
Richard Acayan
c911577eb8
core: graphics: use pressed color for pressed keys
The locked label color is a special color that displays when the user
holds a modifier key for very long. In !7, this locked color replaced
the color for the pressed non-modifier key with no explanation. Revert
the change and use the "label_pressed" color for a non-modifier key
being pressed.
2025-06-12 23:20:45 -04:00
Frieder Hannenheim
a02f404832
Use color configuration options 2025-05-12 18:09:37 -04:00
Richard Acayan
92983bcc99
core: graphics: add switch_greekmath label flags
The label for the layout switcher should be gray and have a small font.
Add the flags for it.
2024-10-31 18:37:55 -04:00
Richard Acayan
bb2a2c24f9
core: graphics: set secondary flag for number key switcher label
The switch_numeric key label should be grey. Set the flag for a
secondary key label.
2024-10-31 18:37:50 -04:00
Richard Acayan
d3d28a310d core: graphics: update scale when layout changes
With the new layout switching, the size of the layout can change. The
scale depends on the size of the layout. Update the graphics scale when
the layout changes.
2024-09-30 22:14:48 -04:00
Richard Acayan
71ca235a09 core: graphics: add label metadata for layout switching keys
Add properties for these labels so they can be used in keys that switch
the layout.
2024-09-30 22:12:59 -04:00
Richard Acayan
f3ba955ae4 core: add meta key
Some applications have features (like typing Unicode codepoints in foot)
that can only be used with key presses. Add a Meta key to allow the user
to always send a keypress.
2024-09-04 21:45:57 -04:00
Richard Acayan
e17e4f31f5 core: graphics: finish supporting glyphs extending past font descent
Extend the height of the label when a glyph goes past the descent.

Also truncate the bitmap when the height is final.

Also remove statements added for debugging.
2024-08-19 23:14:08 -04:00
Richard Acayan
70775b8350 core: graphics: adjust size for glyphs outside regular vertical bounds
Some glyphs, specifically some Arabic text, may have a top that is
higher than the ascent value of the font, or a bottom that is lower than
the descent value of the font. For glyphs that fit inside the area, the
ascent and descent should be used for aligning with the top or bottom of
a key respectively. For glyphs that do not, align the top and bottom of
the text with the top and bottom of the key.
2024-08-19 21:47:39 -04:00
Richard Acayan
bc9056aa8d core: graphics: use key part text
Some keys may have no XKB key symbols. Instead of a hash table mapping
XKB key symbols to their labels, repurpose the text from the key part.
2024-07-26 22:41:24 -04:00
Richard Acayan
ab033c1f21 core: graphics: use AtomicPtr
This type is required to implement both the Send and Sync trait.
2024-07-24 22:32:00 -04:00
Richard Acayan
78f389beaa treewide: use Rust 2018 import paths
Rust 2018 is required for D-Bus support with tokio/zbus.
2024-07-24 22:32:00 -04:00
Richard Acayan
9ec712bb69 core: graphics: use saturating_add for copying images
High-level language skill issue :P
2024-07-19 17:10:28 -04:00
Richard Acayan
4a6b261be0 rewrite in rust 2024-07-18 20:32:55 -04:00