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

Side by Side Diff: chrome/browser/ui/libgtkui/native_theme_gtk3.cc

Issue 2961223002: Rename native theme color constants relating to text on dialog buttons
Patch Set: rebase Created 3 years, 5 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 | « chrome/browser/ui/libgtkui/native_theme_gtk2.cc ('k') | ui/native_theme/common_theme.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ui/libgtkui/native_theme_gtk3.h" 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk3.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h" 9 #include "chrome/browser/ui/libgtkui/chrome_gtk_frame.h"
10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h" 10 #include "chrome/browser/ui/libgtkui/chrome_gtk_menu_subclasses.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 // Default color comes from gtklinkbutton.c. 175 // Default color comes from gtklinkbutton.c.
176 return SkColorSetRGB(0x00, 0x00, 0xEE); 176 return SkColorSetRGB(0x00, 0x00, 0xEE);
177 } 177 }
178 178
179 // Separator 179 // Separator
180 case ui::NativeTheme::kColorId_SeparatorColor: 180 case ui::NativeTheme::kColorId_SeparatorColor:
181 return GetSeparatorColor("GtkSeparator#separator.horizontal"); 181 return GetSeparatorColor("GtkSeparator#separator.horizontal");
182 182
183 // Button 183 // Button
184 case ui::NativeTheme::kColorId_ButtonEnabledColor: 184 case ui::NativeTheme::kColorId_TextOnEnabledDialogButton:
185 return GetFgColor("GtkButton#button.text-button GtkLabel"); 185 return GetFgColor("GtkButton#button.text-button GtkLabel");
186 case ui::NativeTheme::kColorId_ButtonDisabledColor: 186 case ui::NativeTheme::kColorId_TextOnDisabledDialogButton:
187 return GetFgColor("GtkButton#button.text-button:disabled GtkLabel"); 187 return GetFgColor("GtkButton#button.text-button:disabled GtkLabel");
188 case ui::NativeTheme::kColorId_ButtonHoverColor: 188 case ui::NativeTheme::kColorId_ButtonHoverColor:
189 return GetFgColor("GtkButton#button.text-button:hover GtkLabel"); 189 return GetFgColor("GtkButton#button.text-button:hover GtkLabel");
190 case ui::NativeTheme::kColorId_ButtonPressedShade: 190 case ui::NativeTheme::kColorId_ButtonPressedShade:
191 return SK_ColorTRANSPARENT; 191 return SK_ColorTRANSPARENT;
192 192
193 // BlueButton 193 // BlueButton
194 case ui::NativeTheme::kColorId_BlueButtonEnabledColor: 194 case ui::NativeTheme::kColorId_BlueButtonEnabledColor:
195 return GetFgColor( 195 return GetFgColor(
196 "GtkButton#button.text-button.default.suggested-action GtkLabel"); 196 "GtkButton#button.text-button.default.suggested-action GtkLabel");
(...skipping 10 matching lines...) Expand all
207 "GtkButton#button.text-button.default.suggested-action:hover:active " 207 "GtkButton#button.text-button.default.suggested-action:hover:active "
208 "GtkLabel"); 208 "GtkLabel");
209 case ui::NativeTheme::kColorId_BlueButtonShadowColor: 209 case ui::NativeTheme::kColorId_BlueButtonShadowColor:
210 return SK_ColorTRANSPARENT; 210 return SK_ColorTRANSPARENT;
211 211
212 // ProminentButton 212 // ProminentButton
213 case ui::NativeTheme::kColorId_ProminentButtonColor: 213 case ui::NativeTheme::kColorId_ProminentButtonColor:
214 return GetBgColor( 214 return GetBgColor(
215 "GtkTreeView#treeview.view " 215 "GtkTreeView#treeview.view "
216 "GtkTreeView#treeview.view.cell:selected:focus"); 216 "GtkTreeView#treeview.view.cell:selected:focus");
217 case ui::NativeTheme::kColorId_TextOnProminentButtonColor: 217 case ui::NativeTheme::kColorId_TextOnProminentDialogButton:
218 return GetFgColor( 218 return GetFgColor(
219 "GtkTreeView#treeview.view " 219 "GtkTreeView#treeview.view "
220 "GtkTreeView#treeview.view.cell:selected:focus GtkLabel"); 220 "GtkTreeView#treeview.view.cell:selected:focus GtkLabel");
221 221
222 // Textfield 222 // Textfield
223 case ui::NativeTheme::kColorId_TextfieldDefaultColor: 223 case ui::NativeTheme::kColorId_TextfieldDefaultColor:
224 return GetFgColor(GtkVersionCheck(3, 20) 224 return GetFgColor(GtkVersionCheck(3, 20)
225 ? "GtkTextView#textview.view #text" 225 ? "GtkTextView#textview.view #text"
226 : "GtkTextView.view"); 226 : "GtkTextView.view");
227 case ui::NativeTheme::kColorId_TextfieldDefaultBackground: 227 case ui::NativeTheme::kColorId_TextfieldDefaultBackground:
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 if (frame_top_area.incognito) { 647 if (frame_top_area.incognito) {
648 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap( 648 bitmap = SkBitmapOperations::CreateHSLShiftedBitmap(
649 bitmap, kDefaultTintFrameIncognito); 649 bitmap, kDefaultTintFrameIncognito);
650 } 650 }
651 651
652 canvas->drawBitmap(bitmap, rect.x(), rect.y()); 652 canvas->drawBitmap(bitmap, rect.x(), rect.y());
653 } 653 }
654 654
655 } // namespace libgtkui 655 } // namespace libgtkui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/native_theme_gtk2.cc ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698