2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c: * clutter/eglx/clutter-backend-egl.c: * clutter/sdl/clutter-backend-sdl.c: Set the default resolution as 96.0 dpi for every backend (we already were under this assumption anyway, and this makes it easier to change this setting per-backend). * clutter/pango/pangoclutter-fontmap.c: * clutter/pango/pangoclutter.h: Allow setting the resolution for the PangoClutterFontMap object and provide the implementation for the PangoFcFontMap::get_resolution() virtual function. This allows to set the resolution of the PangoContext when retrieving it. * clutter/clutter-label.c (clutter_label_init): Set the resolution of the font map with the one the backend gives us. * clutter/clutter-entry.c (clutter_entry_init): Ditto.
This commit is contained in:
@ -60,6 +60,7 @@ clutter_backend_egl_post_parse (ClutterBackend *backend,
|
||||
if (backend_egl->xdpy)
|
||||
{
|
||||
EGLBoolean status;
|
||||
double dpi;
|
||||
|
||||
CLUTTER_NOTE (MISC, "Getting the X screen");
|
||||
|
||||
@ -77,6 +78,10 @@ clutter_backend_egl_post_parse (ClutterBackend *backend,
|
||||
|
||||
backend_egl->edpy = eglGetDisplay(backend_egl->xdpy);
|
||||
|
||||
dpi = (((double) DisplayHeight (backend_egl->xdpy, backend_egl->xscreen_num) * 25.4)
|
||||
/ (double) DisplayHeightMM (backend_egl->xdpy, backend_egl->xscreen_num));
|
||||
clutter_backend_set_resolution (backend, dpi);
|
||||
|
||||
status = eglInitialize(backend_egl->edpy,
|
||||
&backend_egl->egl_version_major,
|
||||
&backend_egl->egl_version_minor);
|
||||
@ -294,6 +299,7 @@ clutter_backend_egl_init (ClutterBackendEGL *backend_egl)
|
||||
ClutterBackend *backend = CLUTTER_BACKEND (backend_egl);
|
||||
|
||||
/* FIXME: get from xsettings */
|
||||
clutter_backend_set_resolution (backend, 96.0);
|
||||
clutter_backend_set_double_click_time (backend, 250);
|
||||
clutter_backend_set_double_click_distance (backend, 5);
|
||||
}
|
||||
|
Reference in New Issue
Block a user