Merge branch 'fix-bottom-margin' into 'master'

Fix clipping issue at bottom of keyboard

Closes #47

See merge request Librem5/squeekboard!58
This commit is contained in:
David Boddie
2019-07-11 23:07:01 +00:00

View File

@ -162,9 +162,14 @@ create_keyboard_surface (EekRenderer *renderer)
&background); &background);
eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds); eek_element_get_bounds (EEK_ELEMENT(priv->keyboard), &bounds);
keyboard_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
ceil(bounds.width * priv->scale), /* Create a surface that encompasses the dimensions of the keyboard as well
ceil(bounds.height * priv->scale)); as the margin around the edge. */
keyboard_surface = cairo_image_surface_create (
CAIRO_FORMAT_ARGB32,
ceil(((bounds.x * 2) + bounds.width) * priv->scale),
ceil(((bounds.y * 2) + bounds.height) * priv->scale));
data.cr = cairo_create (keyboard_surface); data.cr = cairo_create (keyboard_surface);
data.renderer = renderer; data.renderer = renderer;