Skip to content

Commit 529aa13

Browse files
committed
Use AnimationsSettings
1 parent 0935972 commit 529aa13

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/Gestures/GesturePropertyTransition.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public class Gala.GesturePropertyTransition : Object {
129129

130130
actor.save_easing_state ();
131131
actor.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
132-
actor.set_easing_duration (gesture_tracker.settings.is_animation_enabled () ? calculated_duration : 0);
132+
actor.set_easing_duration (AnimationsSettings.get_enable_animations () ? calculated_duration : 0);
133133
actor.set_property (property, cancel_action ? from_value : to_value);
134134
actor.restore_easing_state ();
135135

@@ -141,14 +141,14 @@ public class Gala.GesturePropertyTransition : Object {
141141
}
142142
};
143143

144-
if (with_gesture && gesture_tracker.settings.is_animation_enabled ()) {
144+
if (with_gesture && AnimationsSettings.get_enable_animations ()) {
145145
gesture_tracker.connect_handlers (on_animation_begin, on_animation_update, on_animation_end);
146146
} else {
147147
on_animation_begin (0);
148148
if (intermediate_value != null) {
149149
actor.save_easing_state ();
150150
actor.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
151-
actor.set_easing_duration (gesture_tracker.settings.is_animation_enabled () ? gesture_tracker.min_animation_duration : 0);
151+
actor.set_easing_duration (AnimationsSettings.get_enable_animations () ? gesture_tracker.min_animation_duration : 0);
152152
actor.set_property (property, intermediate_value);
153153
actor.restore_easing_state ();
154154

src/Gestures/GestureSettings.vala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@
2121
*/
2222
public class Gala.GestureSettings : Object {
2323
private static GLib.Settings gala_settings;
24-
private static GLib.Settings animation_settings;
2524
private static GLib.Settings touchpad_settings;
2625

2726
static construct {
2827
gala_settings = new GLib.Settings ("io.elementary.desktop.wm.gestures");
29-
animation_settings = new GLib.Settings ("io.elementary.desktop.wm.animations");
3028
touchpad_settings = new GLib.Settings ("org.gnome.desktop.peripherals.touchpad");
3129
}
3230

@@ -36,10 +34,6 @@ public class Gala.GestureSettings : Object {
3634
: touchpad_settings.get_boolean ("natural-scroll");
3735
}
3836

39-
public bool is_animation_enabled () {
40-
return animation_settings.get_boolean ("enable-animations");
41-
}
42-
4337
public Meta.MotionDirection? get_direction (Gesture gesture) {
4438
switch (gesture.direction) {
4539
case GestureDirection.UP:

0 commit comments

Comments
 (0)