~timchen119/unity-control-center/unity-control-center.lp1417034.trusty

« back to all changes in this revision

Viewing changes to panels/display/cc-display-panel.c

  • Committer: CI bot
  • Author(s): Robert Ancell
  • Date: 2014-03-28 12:57:49 UTC
  • mfrom: (12765.1.1 ui-scale-keyboard)
  • Revision ID: ps-jenkins@lists.canonical.com-20140328125749-574i9my0iiyfgne6
Allow the UI scale to be controlled by the keyboard Fixes: 1296966

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
#define UI_SCALE_MIN 4.0
69
69
#define UI_SCALE_MAX 32.0
 
70
#define UI_SCALE_STEP 1.0
 
71
#define UI_SCALE_DEFAULT 8.0
70
72
 
71
73
enum {
72
74
  TEXT_COL,
602
604
    return;
603
605
  }
604
606
 
 
607
  gtk_adjustment_set_step_increment (adj, UI_SCALE_STEP);
605
608
  gtk_adjustment_set_upper (adj, UI_SCALE_MAX);
606
609
  gtk_adjustment_set_lower (adj, UI_SCALE_MIN);
607
610
  gtk_scale_set_digits (GTK_SCALE(self->priv->ui_scale), 0);
608
 
  gtk_scale_add_mark (GTK_SCALE(self->priv->ui_scale), 8, GTK_POS_TOP, NULL);
 
611
  gtk_scale_add_mark (GTK_SCALE(self->priv->ui_scale), UI_SCALE_DEFAULT, GTK_POS_TOP, NULL);
609
612
 
610
613
  dict = g_settings_get_value (self->priv->desktop_settings, "scale-factor");
611
614
  if (!g_variant_lookup (dict, monitor_name, "i", &value))
612
615
  {
613
 
    value = 8;
 
616
    value = UI_SCALE_DEFAULT;
614
617
    self->priv->ui_prev_scale = value;
615
618
  }
616
619
  new_dict = add_dict_entry (dict, monitor_name, value);