OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/examples/slider_example.h" | 5 #include "ui/views/examples/slider_example.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "ui/views/controls/label.h" | 9 #include "ui/views/controls/label.h" |
10 #include "ui/views/layout/box_layout.h" | 10 #include "ui/views/layout/box_layout.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 namespace examples { | 14 namespace examples { |
15 | 15 |
16 SliderExample::SliderExample() | 16 SliderExample::SliderExample() |
17 : ExampleBase("Slider"), | 17 : ExampleBase("Slider"), |
(...skipping 18 matching lines...) Expand all Loading... |
36 void SliderExample::SliderValueChanged(Slider* sender, | 36 void SliderExample::SliderValueChanged(Slider* sender, |
37 float value, | 37 float value, |
38 float old_value, | 38 float old_value, |
39 SliderChangeReason reason) { | 39 SliderChangeReason reason) { |
40 label_->SetText(ASCIIToUTF16(base::StringPrintf("%.3lf", value))); | 40 label_->SetText(ASCIIToUTF16(base::StringPrintf("%.3lf", value))); |
41 } | 41 } |
42 | 42 |
43 } // namespace examples | 43 } // namespace examples |
44 } // namespace views | 44 } // namespace views |
45 | 45 |
OLD | NEW |