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

Proposed by Robert Ancell on 2014-03-24
Status: Merged
Approved by: Sebastien Bacher on 2014-03-25
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 2014-03-24 Approve on 2014-03-25
PS Jenkins bot (community) continuous-integration Approve on 2014-03-24
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.
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
1=== modified file 'panels/display/cc-display-panel.c'
2--- panels/display/cc-display-panel.c 2014-02-26 15:58:33 +0000
3+++ panels/display/cc-display-panel.c 2014-03-24 23:19:46 +0000
4@@ -67,6 +67,8 @@
5
6 #define UI_SCALE_MIN 4.0
7 #define UI_SCALE_MAX 32.0
8+#define UI_SCALE_STEP 1.0
9+#define UI_SCALE_DEFAULT 8.0
10
11 enum {
12 TEXT_COL,
13@@ -602,15 +604,16 @@
14 return;
15 }
16
17+ gtk_adjustment_set_step_increment (adj, UI_SCALE_STEP);
18 gtk_adjustment_set_upper (adj, UI_SCALE_MAX);
19 gtk_adjustment_set_lower (adj, UI_SCALE_MIN);
20 gtk_scale_set_digits (GTK_SCALE(self->priv->ui_scale), 0);
21- gtk_scale_add_mark (GTK_SCALE(self->priv->ui_scale), 8, GTK_POS_TOP, NULL);
22+ gtk_scale_add_mark (GTK_SCALE(self->priv->ui_scale), UI_SCALE_DEFAULT, GTK_POS_TOP, NULL);
23
24 dict = g_settings_get_value (self->priv->desktop_settings, "scale-factor");
25 if (!g_variant_lookup (dict, monitor_name, "i", &value))
26 {
27- value = 8;
28+ value = UI_SCALE_DEFAULT;
29 self->priv->ui_prev_scale = value;
30 }
31 new_dict = add_dict_entry (dict, monitor_name, value);

Subscribers

People subscribed via source and target branches