slider: Don't hardcode scroll interval for smooth scrolling

Use the SLIDER_SCROLL_STEP constant instead for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=742648
This commit is contained in:
Adel Gadllah 2015-01-10 13:12:48 +01:00
parent 1a30f1b2f0
commit fd4f2f405f

View File

@ -197,7 +197,7 @@ const Slider = new Lang.Class({
let [dx, dy] = event.get_scroll_delta(); let [dx, dy] = event.get_scroll_delta();
// Even though the slider is horizontal, use dy to match // Even though the slider is horizontal, use dy to match
// the UP/DOWN above. // the UP/DOWN above.
delta = -dy / 10; delta = -dy * SLIDER_SCROLL_STEP;
} }
this._value = Math.min(Math.max(0, this._value + delta), 1); this._value = Math.min(Math.max(0, this._value + delta), 1);