16 Commits

Author SHA1 Message Date
Amir Dahan
d423720553 Add basic rounding
There's probably a better way of doing this, But this will do for now.

Added basic rounding to buttons.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2024-04-14 18:18:34 +02:00
Frank Oltmanns
d6439afcb9 Make font selection scheme specific
Add the members font and font_descriptor to struct clr_scheme, so that
it is possible to specify a font for each scheme.

During initialization create the font descriptors for each scheme.

Instead of initially setting the font descriptor when setting up the
buffer, set the font descriptor when drawing the text.

Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2023-10-29 13:07:57 +01:00
Willow Barraco
730e97038c Support fractional-scale-v1
This make text less blurry. It continues to works without.

before:
https://dav.missbanal.net/00bd0fd5-e22f-4a60-87f8-ce6f400d33c9.png

after:
https://dav.missbanal.net/a3f02f1e-d6ce-4378-a141-e2093ba87eed.png
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2023-09-08 21:17:31 +02:00
Willow Barraco
24e354ce9e
Add popup to display pressed keys 2023-09-06 15:29:07 +02:00
Willow Barraco
c45446a794
Do not write texts outside of keys
This is a bit hacky. The main problem is that there is no way to tell
cairo to limit the width. It will wrap text accordingly to width and
height, it will add ellipsizes if it overlow the box, but if a word
width is larger than the box width, it will write it.

To avoid that, I make sure we don't go too much to the left, and I
redraw the background at the right of the keys. This is not visible
cause we damage track correctly the updated buffer coordinates.

I also moved the damage tracking from do_rectangle and draw_text to
higher draw_key and draw_layout.
2023-08-31 18:04:26 +02:00
ArenM
1843e60a74 only commit surface when it changed
Previously wvkbd would commit an (usually) unchanged surface at the
framerate of the compositor, this only commits the buffer when we render
something new.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-07-05 22:13:21 +02:00
Zach DeCook
564eb4536a overlapped key output: highlight letters swiped through 2022-01-10 03:08:06 +00:00
Maarten van Gompel
bb1eff09be applied clang-format (no functional changes), but exempted custom include order in keyboard.c and main.c 2021-10-19 23:12:01 -07:00
Stacy Harper
450d43ff44 Handle hide and show signals 2021-10-19 23:12:01 -07:00
Stacy Harper
4ce0cf1b53 Better damage tracking 2021-10-19 23:12:01 -07:00
Stacy Harper
efd00ad31b Remove useless duplication 2021-10-19 23:12:01 -07:00
Stacy Harper
b65ea995f1 Simplify ctx initializer 2021-10-19 23:12:01 -07:00
Stacy Harper
32cf611c9c Remove useless cb 2021-10-19 23:12:01 -07:00
Stacy Harper
fb82daea9c Handle output scaling 2021-10-19 23:12:01 -07:00
Stacy Harper
c806023fd5 Drop wld and implement our own pangocairo renderer 2021-10-19 23:12:01 -07:00
John Sullivan
590b75b23a Init 2020-09-13 04:44:15 -07:00