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

Side by Side Diff: ui/native_theme/common_theme.cc

Issue 2345183002: Views: Draw Textfield selected text in gray when top-level Widget loses focus.
Patch Set: Fix up diff & add colors to Windows/Mac. Created 4 years, 3 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
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/native_theme/common_theme.h" 5 #include "ui/native_theme/common_theme.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 case NativeTheme::kColorId_TextfieldDefaultBackground: 346 case NativeTheme::kColorId_TextfieldDefaultBackground:
347 return kTextfieldDefaultBackground; 347 return kTextfieldDefaultBackground;
348 case NativeTheme::kColorId_TextfieldReadOnlyColor: 348 case NativeTheme::kColorId_TextfieldReadOnlyColor:
349 return kTextfieldReadOnlyColor; 349 return kTextfieldReadOnlyColor;
350 case NativeTheme::kColorId_TextfieldReadOnlyBackground: 350 case NativeTheme::kColorId_TextfieldReadOnlyBackground:
351 return kTextfieldReadOnlyBackground; 351 return kTextfieldReadOnlyBackground;
352 case NativeTheme::kColorId_TextfieldSelectionColor: 352 case NativeTheme::kColorId_TextfieldSelectionColor:
353 return kTextfieldSelectionColor; 353 return kTextfieldSelectionColor;
354 case NativeTheme::kColorId_TextfieldSelectionBackgroundFocused: 354 case NativeTheme::kColorId_TextfieldSelectionBackgroundFocused:
355 return kTextfieldSelectionBackgroundFocused; 355 return kTextfieldSelectionBackgroundFocused;
356 case NativeTheme::kColorId_TextfieldSelectionBackgroundUnfocused:
357 return kTextfieldSelectionBackgroundFocused;
356 358
357 // Tooltip 359 // Tooltip
358 case NativeTheme::kColorId_TooltipBackground: 360 case NativeTheme::kColorId_TooltipBackground:
359 return kTooltipBackground; 361 return kTooltipBackground;
360 case NativeTheme::kColorId_TooltipText: 362 case NativeTheme::kColorId_TooltipText:
361 return kTooltipTextColor; 363 return kTooltipTextColor;
362 364
363 // Tree 365 // Tree
364 case NativeTheme::kColorId_TreeBackground: 366 case NativeTheme::kColorId_TreeBackground:
365 return kTreeBackground; 367 return kTreeBackground;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 474 }
473 if (menu_item.corner_radius > 0) { 475 if (menu_item.corner_radius > 0) {
474 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 476 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
475 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 477 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
476 return; 478 return;
477 } 479 }
478 canvas->drawRect(gfx::RectToSkRect(rect), paint); 480 canvas->drawRect(gfx::RectToSkRect(rect), paint);
479 } 481 }
480 482
481 } // namespace ui 483 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698