Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: ui/views/controls/slider.cc

Issue 2297833002: Fix controlling volume slider with keyboard (Closed)
Patch Set: improve tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/slider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/slider.cc
diff --git a/ui/views/controls/slider.cc b/ui/views/controls/slider.cc
index f1595999302e689771e3a41857a9acc94ef22149..08dc0f6fdcaa0a056d358e9f7ec73149e5293a1b 100644
--- a/ui/views/controls/slider.cc
+++ b/ui/views/controls/slider.cc
@@ -242,7 +242,7 @@ void Slider::OnMouseReleased(const ui::MouseEvent& event) {
}
bool Slider::OnKeyPressed(const ui::KeyEvent& event) {
- int new_value = value_;
+ float new_value = value_;
if (event.key_code() == ui::VKEY_LEFT)
new_value -= keyboard_increment_;
else if (event.key_code() == ui::VKEY_RIGHT)
« no previous file with comments | « no previous file | ui/views/controls/slider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698