[clutter/clutter-1.18] settings: Make unscaled-font-dpi override font-dpi



commit 773e544c511f38d521a6735e065f0526c2ebe95b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jan 23 11:30:49 2014 +0000

    settings: Make unscaled-font-dpi override font-dpi
    
    The :unscaled-font-dpi property is used to override the existing
    :font-dpi value when running on high DPI density displays; since it's a
    write-only property we don't need to have a separate storage, nor we
    need to choose between :font-dpi and :unscaled-font-dpi depending on
    whether or not either has been set. If we select which one to use
    between :font-dpi and :unscaled-font-dpi when computing the font
    resolution, we end up breaking the code that relies on changing
    :font-dpi directly on a per-Settings basis.

 clutter/clutter-settings.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/clutter/clutter-settings.c b/clutter/clutter-settings.c
index 56d785d..f0e3ef0 100644
--- a/clutter/clutter-settings.c
+++ b/clutter/clutter-settings.c
@@ -207,9 +207,7 @@ settings_update_resolution (ClutterSettings *self)
 {
   const char *scale_env = NULL;
 
-  if (self->unscaled_font_dpi > 0)
-    self->resolution = (gdouble) self->unscaled_font_dpi / 1024.0;
-  else if (self->font_dpi > 0)
+  if (self->font_dpi > 0)
     self->resolution = (gdouble) self->font_dpi / 1024.0;
   else
     self->resolution = 96.0;
@@ -361,7 +359,7 @@ clutter_settings_set_property (GObject      *gobject,
       break;
 
     case PROP_UNSCALED_FONT_DPI:
-      self->unscaled_font_dpi = g_value_get_int (value);
+      self->font_dpi = g_value_get_int (value);
       settings_update_resolution (self);
       break;
 
@@ -572,15 +570,6 @@ clutter_settings_class_init (ClutterSettingsClass *klass)
                       -1,
                       CLUTTER_PARAM_READWRITE);
 
-  /**
-   * ClutterSettings:unscaled-font-dpi:
-   *
-   * The DPI used when rendering unscaled text, as a value of 1024 * dots/inch.
-   *
-   * If set to -1, the system's default will be used instead
-   *
-   * Since: 1.4
-   */
   obj_props[PROP_UNSCALED_FONT_DPI] =
     g_param_spec_int ("unscaled-font-dpi",
                       P_("Font DPI"),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]