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

Side by Side Diff: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc

Issue 1525163004: First stab at MD text buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 | chrome/browser/ui/views/infobars/confirm_infobar.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/libgtk2ui/native_theme_gtk2.h" 5 #include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h" 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h"
10 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h" 10 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h"
11 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 11 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
12 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" 12 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
13 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" 13 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
14 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
15 #include "ui/gfx/color_palette.h"
15 #include "ui/gfx/color_utils.h" 16 #include "ui/gfx/color_utils.h"
16 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
18 #include "ui/gfx/path.h" 19 #include "ui/gfx/path.h"
19 #include "ui/gfx/skia_util.h" 20 #include "ui/gfx/skia_util.h"
20 #include "ui/native_theme/common_theme.h" 21 #include "ui/native_theme/common_theme.h"
21 22
22 namespace libgtk2ui { 23 namespace libgtk2ui {
23 24
24 namespace { 25 namespace {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 return GetTextColor(GetBlueButton(), PRELIGHT); 313 return GetTextColor(GetBlueButton(), PRELIGHT);
313 case kColorId_ButtonHoverBackgroundColor: 314 case kColorId_ButtonHoverBackgroundColor:
314 return GetBGColor(GetButton(), PRELIGHT); 315 return GetBGColor(GetButton(), PRELIGHT);
315 case kColorId_BlueButtonPressedColor: 316 case kColorId_BlueButtonPressedColor:
316 return GetTextColor(GetBlueButton(), ACTIVE); 317 return GetTextColor(GetBlueButton(), ACTIVE);
317 case kColorId_BlueButtonShadowColor: 318 case kColorId_BlueButtonShadowColor:
318 return SK_ColorTRANSPARENT; 319 return SK_ColorTRANSPARENT;
319 // return GetTextColor(GetButton(), NORMAL); 320 // return GetTextColor(GetButton(), NORMAL);
320 case kColorId_CallToActionColor: 321 case kColorId_CallToActionColor:
321 return GetSystemColor(kColorId_LinkEnabled); 322 return GetSystemColor(kColorId_LinkEnabled);
323 // TODO(estade): set proper values for these.
324 case kColorId_MdTextButtonEnabledColor:
325 case kColorId_MdTextButtonDisabledColor:
326 return gfx::kPlaceholderColor;
322 327
323 // Textfield 328 // Textfield
324 case kColorId_TextfieldDefaultColor: 329 case kColorId_TextfieldDefaultColor:
325 return GetTextColor(GetEntry(), NORMAL); 330 return GetTextColor(GetEntry(), NORMAL);
326 case kColorId_TextfieldDefaultBackground: 331 case kColorId_TextfieldDefaultBackground:
327 return GetBaseColor(GetEntry(), NORMAL); 332 return GetBaseColor(GetEntry(), NORMAL);
328 333
329 #if GTK_MAJOR_VERSION == 2 334 #if GTK_MAJOR_VERSION == 2
330 case kColorId_TextfieldReadOnlyColor: 335 case kColorId_TextfieldReadOnlyColor:
331 return GetTextColor(GetEntry(), ACTIVE); 336 return GetTextColor(GetEntry(), ACTIVE);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 568
564 if (!fake_menu_item) { 569 if (!fake_menu_item) {
565 fake_menu_item = gtk_custom_menu_item_new(); 570 fake_menu_item = gtk_custom_menu_item_new();
566 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item); 571 gtk_menu_shell_append(GTK_MENU_SHELL(GetMenu()), fake_menu_item);
567 } 572 }
568 573
569 return fake_menu_item; 574 return fake_menu_item;
570 } 575 }
571 576
572 } // namespace libgtk2ui 577 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/infobars/confirm_infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698