libeek/gtk: fix scale and geometry calculation

This commit is contained in:
Daiki Ueno
2011-01-12 15:45:18 +09:00
parent cf4d1109d3
commit 125fd4c65c

View File

@ -465,8 +465,8 @@ redraw_key (cairo_t *cr,
gdk_cairo_set_source_color (cr, &style->fg[state]);
cairo_scale (cr,
priv->scale * key_surface_scale[KEY_SURFACE_LARGE],
priv->scale * key_surface_scale[KEY_SURFACE_LARGE]);
key_surface_scale[KEY_SURFACE_LARGE],
key_surface_scale[KEY_SURFACE_LARGE]);
eek_draw_key_label (cr, key, priv->fonts);
break;
}
@ -590,8 +590,8 @@ on_size_allocate (GtkWidget *widget,
eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
priv->scale = allocation->width > allocation->height ?
allocation->width / bounds.width :
allocation->height / bounds.height;
allocation->height / bounds.height :
allocation->width / bounds.width;
}
GtkWidget *