Commit 668b974d authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Improve border rendering without theme.

parent 4427f81d
...@@ -141,11 +141,11 @@ eek_gtk_keyboard_real_draw (GtkWidget *self, ...@@ -141,11 +141,11 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
style = gtk_widget_get_style (self); style = gtk_widget_get_style (self);
state = gtk_widget_get_state (self); state = gtk_widget_get_state (self);
color = color_from_gdk_color (&style->fg[state]); color = color_from_gdk_color (&style->text[state]);
eek_renderer_set_default_foreground_color (priv->renderer, color); eek_renderer_set_default_foreground_color (priv->renderer, color);
eek_color_free (color); eek_color_free (color);
color = color_from_gdk_color (&style->bg[state]); color = color_from_gdk_color (&style->base[state]);
eek_renderer_set_default_background_color (priv->renderer, color); eek_renderer_set_default_background_color (priv->renderer, color);
eek_color_free (color); eek_color_free (color);
} }
......
...@@ -249,8 +249,8 @@ render_key_outline (EekRenderer *renderer, ...@@ -249,8 +249,8 @@ render_key_outline (EekRenderer *renderer,
/* need to rescale so that the border fit inside the clipping /* need to rescale so that the border fit inside the clipping
region */ region */
eek_element_get_bounds (EEK_ELEMENT(key), &bounds); eek_element_get_bounds (EEK_ELEMENT(key), &bounds);
scale = MIN((bounds.width - border_width) / bounds.width, scale = MIN((bounds.width - border_width * 2) / bounds.width,
(bounds.height - border_width) / bounds.height); (bounds.height - border_width * 2) / bounds.height);
outline = eek_keyboard_get_outline (priv->keyboard, oref); outline = eek_keyboard_get_outline (priv->keyboard, oref);
outline = eek_outline_copy (outline); outline = eek_outline_copy (outline);
...@@ -260,8 +260,8 @@ render_key_outline (EekRenderer *renderer, ...@@ -260,8 +260,8 @@ render_key_outline (EekRenderer *renderer,
} }
cairo_translate (cr, cairo_translate (cr,
border_width / 2 * priv->scale, border_width * priv->scale * scale,
border_width / 2 * priv->scale); border_width * priv->scale * scale);
if (gradient_type != EEK_GRADIENT_NONE) { if (gradient_type != EEK_GRADIENT_NONE) {
cairo_pattern_t *pat; cairo_pattern_t *pat;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment