Merge lp:~robert-ancell/unity-control-center/ui-scale-keyboard into lp:unity-control-center

Proposed by Robert Ancell
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 12766
Merged at revision: 12766
Proposed branch: lp:~robert-ancell/unity-control-center/ui-scale-keyboard
Merge into: lp:unity-control-center
Diff against target: 31 lines (+5/-2)
1 file modified
panels/display/cc-display-panel.c (+5/-2)
To merge this branch: bzr merge lp:~robert-ancell/unity-control-center/ui-scale-keyboard
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+212525@code.launchpad.net

Commit message

Allow the UI scale to be controlled by the keyboard

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Looks good, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'panels/display/cc-display-panel.c'
--- panels/display/cc-display-panel.c 2014-02-26 15:58:33 +0000
+++ panels/display/cc-display-panel.c 2014-03-24 23:19:46 +0000
@@ -67,6 +67,8 @@
6767
68#define UI_SCALE_MIN 4.068#define UI_SCALE_MIN 4.0
69#define UI_SCALE_MAX 32.069#define UI_SCALE_MAX 32.0
70#define UI_SCALE_STEP 1.0
71#define UI_SCALE_DEFAULT 8.0
7072
71enum {73enum {
72 TEXT_COL,74 TEXT_COL,
@@ -602,15 +604,16 @@
602 return;604 return;
603 }605 }
604606
607 gtk_adjustment_set_step_increment (adj, UI_SCALE_STEP);
605 gtk_adjustment_set_upper (adj, UI_SCALE_MAX);608 gtk_adjustment_set_upper (adj, UI_SCALE_MAX);
606 gtk_adjustment_set_lower (adj, UI_SCALE_MIN);609 gtk_adjustment_set_lower (adj, UI_SCALE_MIN);
607 gtk_scale_set_digits (GTK_SCALE(self->priv->ui_scale), 0);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);
609612
610 dict = g_settings_get_value (self->priv->desktop_settings, "scale-factor");613 dict = g_settings_get_value (self->priv->desktop_settings, "scale-factor");
611 if (!g_variant_lookup (dict, monitor_name, "i", &value))614 if (!g_variant_lookup (dict, monitor_name, "i", &value))
612 {615 {
613 value = 8;616 value = UI_SCALE_DEFAULT;
614 self->priv->ui_prev_scale = value;617 self->priv->ui_prev_scale = value;
615 }618 }
616 new_dict = add_dict_entry (dict, monitor_name, value);619 new_dict = add_dict_entry (dict, monitor_name, value);

Subscribers

People subscribed via source and target branches