Commit a825ded0 authored by Felipe Borges's avatar Felipe Borges
Browse files

universal-access: Add "Enable Animations" option

Fixes #1388
parent 3e8de662
Pipeline #301236 passed with stages
in 8 minutes and 21 seconds
......@@ -57,6 +57,7 @@
#define KEY_CURSOR_BLINKING_TIME "cursor-blink-time"
#define KEY_MOUSE_CURSOR_SIZE "cursor-size"
#define KEY_LOCATE_POINTER "locate-pointer"
#define KEY_ENABLE_ANIMATIONS "enable-animations"
/* application settings */
#define APPLICATION_SETTINGS "org.gnome.desktop.a11y.applications"
......@@ -117,6 +118,7 @@ struct _CcUaPanel
GtkLabel *cursor_size_label;
GtkListBoxRow *cursor_size_row;
GtkScale *double_click_delay_scale;
GtkSwitch *enable_animations_switch;
GtkListBox *hearing_listbox;
GtkSwitch *highcontrast_enable_switch;
GtkListBoxRow *highcontrast_row;
......@@ -210,6 +212,7 @@ cc_ua_panel_class_init (CcUaPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_size_label);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, cursor_size_row);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, double_click_delay_scale);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, enable_animations_switch);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, hearing_listbox);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, highcontrast_enable_switch);
gtk_widget_class_bind_template_child (widget_class, CcUaPanel, highcontrast_row);
......@@ -530,6 +533,12 @@ cc_ua_panel_init_seeing (CcUaPanel *self)
self,
NULL);
/* enable animation */
g_settings_bind (self->interface_settings, KEY_ENABLE_ANIMATIONS,
self->enable_animations_switch, "active",
G_SETTINGS_BIND_DEFAULT);
/* large text */
g_settings_bind_with_mapping (self->interface_settings, KEY_TEXT_SCALING_FACTOR,
......
......@@ -216,6 +216,44 @@
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="enable_animations_row">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selectable">False</property>
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="xalign">0</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Enable A_nimations</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">enable_animations_switch</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="enable_animations_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="cursor_size_row">
<property name="visible">True</property>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment