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

Side by Side Diff: ui/views/examples/slider_example.cc

Issue 10824016: views/examples: Pure pedantic change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/examples/slider_example.h ('k') | ui/views/examples/text_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/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"
(...skipping 18 matching lines...) Expand all
29 slider_->SetValue(0.5); 29 slider_->SetValue(0.5);
30 30
31 container->SetLayoutManager(new BoxLayout(BoxLayout::kHorizontal, 3, 3, 3)); 31 container->SetLayoutManager(new BoxLayout(BoxLayout::kHorizontal, 3, 3, 3));
32 container->AddChildView(slider_); 32 container->AddChildView(slider_);
33 container->AddChildView(label_); 33 container->AddChildView(label_);
34 } 34 }
35 35
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 views::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
OLDNEW
« no previous file with comments | « ui/views/examples/slider_example.h ('k') | ui/views/examples/text_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698