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

Side by Side Diff: ui/views/controls/button/checkbox.cc

Issue 2438053002: Fix checkbox ink drop ripple for RTL. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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/controls/button/checkbox.h" 5 #include "ui/views/controls/button/checkbox.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 UpdateImage(); 158 UpdateImage();
159 } 159 }
160 160
161 void Checkbox::OnNativeThemeChanged(const ui::NativeTheme* theme) { 161 void Checkbox::OnNativeThemeChanged(const ui::NativeTheme* theme) {
162 LabelButton::OnNativeThemeChanged(theme); 162 LabelButton::OnNativeThemeChanged(theme);
163 if (UseMd()) 163 if (UseMd())
164 UpdateImage(); 164 UpdateImage();
165 } 165 }
166 166
167 std::unique_ptr<InkDropRipple> Checkbox::CreateInkDropRipple() const { 167 std::unique_ptr<InkDropRipple> Checkbox::CreateInkDropRipple() const {
168 return CreateDefaultInkDropRipple(image()->bounds().CenterPoint()); 168 return CreateDefaultInkDropRipple(image()->GetMirroredBounds().CenterPoint());
169 } 169 }
170 170
171 std::unique_ptr<InkDropHighlight> Checkbox::CreateInkDropHighlight() const { 171 std::unique_ptr<InkDropHighlight> Checkbox::CreateInkDropHighlight() const {
172 return nullptr; 172 return nullptr;
173 } 173 }
174 174
175 SkColor Checkbox::GetInkDropBaseColor() const { 175 SkColor Checkbox::GetInkDropBaseColor() const {
176 return GetNativeTheme()->GetSystemColor( 176 return GetNativeTheme()->GetSystemColor(
177 ui::NativeTheme::kColorId_ButtonEnabledColor); 177 ui::NativeTheme::kColorId_ButtonEnabledColor);
178 } 178 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ui::NativeTheme::Part Checkbox::GetThemePart() const { 223 ui::NativeTheme::Part Checkbox::GetThemePart() const {
224 return ui::NativeTheme::kCheckbox; 224 return ui::NativeTheme::kCheckbox;
225 } 225 }
226 226
227 void Checkbox::GetExtraParams(ui::NativeTheme::ExtraParams* params) const { 227 void Checkbox::GetExtraParams(ui::NativeTheme::ExtraParams* params) const {
228 LabelButton::GetExtraParams(params); 228 LabelButton::GetExtraParams(params);
229 params->button.checked = checked_; 229 params->button.checked = checked_;
230 } 230 }
231 231
232 } // namespace views 232 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698