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

Side by Side Diff: ui/views/style/platform_style.cc

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: two slight fixes 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/style/platform_style.h" 5 #include "ui/views/style/platform_style.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/base/material_design/material_design_controller.h" 9 #include "ui/base/material_design/material_design_controller.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX) 83 #if !defined(DESKTOP_LINUX) && !defined(OS_MACOSX)
84 // static 84 // static
85 void PlatformStyle::ApplyLabelButtonTextStyle( 85 void PlatformStyle::ApplyLabelButtonTextStyle(
86 Label* label, 86 Label* label,
87 ButtonColorByState* color_by_state) { 87 ButtonColorByState* color_by_state) {
88 ButtonColorByState& colors = *color_by_state; 88 ButtonColorByState& colors = *color_by_state;
89 colors[Button::STATE_NORMAL] = kStyleButtonTextColor; 89 colors[Button::STATE_NORMAL] = kStyleButtonTextColor;
90 colors[Button::STATE_HOVERED] = kStyleButtonTextColor; 90 colors[Button::STATE_HOVERED] = kStyleButtonTextColor;
91 colors[Button::STATE_PRESSED] = kStyleButtonTextColor; 91 colors[Button::STATE_PRESSED] = kStyleButtonTextColor;
92 92
93 const ui::NativeTheme* theme = label->GetNativeTheme();
94 label->SetBackgroundColor(
95 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonBackgroundColor));
96 label->SetAutoColorReadabilityEnabled(false);
Evan Stade 2016/09/30 18:02:36 afaict, the label's background color is effectivel
tdanderson 2016/09/30 21:00:56 Acknowledged.
97 label->SetShadows(gfx::ShadowValues( 93 label->SetShadows(gfx::ShadowValues(
98 1, gfx::ShadowValue(gfx::Vector2d(0, 1), 0, kStyleButtonShadowColor))); 94 1, gfx::ShadowValue(gfx::Vector2d(0, 1), 0, kStyleButtonShadowColor)));
99 } 95 }
100 #endif 96 #endif
101 97
102 #if !defined(DESKTOP_LINUX) 98 #if !defined(DESKTOP_LINUX)
103 // static 99 // static
104 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( 100 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
105 LabelButton* button) { 101 LabelButton* button) {
106 return button->CreateDefaultBorder(); 102 return button->CreateDefaultBorder();
107 } 103 }
108 #endif 104 #endif
109 105
110 } // namespace views 106 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698