| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |