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

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

Issue 360123003: Don't put a text shadow on blue buttons in gtk theme mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (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_menu_subclasses.h" 9 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h"
10 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 10 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 case kComboboxArrow: 144 case kComboboxArrow:
145 PaintComboboxArrow(canvas, GetGtkState(state), rect); 145 PaintComboboxArrow(canvas, GetGtkState(state), rect);
146 return; 146 return;
147 147
148 default: 148 default:
149 NativeThemeBase::Paint(canvas, part, state, rect, extra); 149 NativeThemeBase::Paint(canvas, part, state, rect, extra);
150 } 150 }
151 } 151 }
152 152
153 SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const { 153 SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const {
154 if (color_id == kColorId_BlueButtonShadowColor)
155 return SK_ColorTRANSPARENT;
156
154 return GdkColorToSkColor(GetSystemGdkColor(color_id)); 157 return GdkColorToSkColor(GetSystemGdkColor(color_id));
155 } 158 }
156 159
157 void NativeThemeGtk2::PaintMenuPopupBackground( 160 void NativeThemeGtk2::PaintMenuPopupBackground(
158 SkCanvas* canvas, 161 SkCanvas* canvas,
159 const gfx::Size& size, 162 const gfx::Size& size,
160 const MenuBackgroundExtraParams& menu_background) const { 163 const MenuBackgroundExtraParams& menu_background) const {
161 if (menu_background.corner_radius > 0) { 164 if (menu_background.corner_radius > 0) {
162 SkPaint paint; 165 SkPaint paint;
163 paint.setStyle(SkPaint::kFill_Style); 166 paint.setStyle(SkPaint::kFill_Style);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 return GetButtonStyle()->text[GTK_STATE_INSENSITIVE]; 266 return GetButtonStyle()->text[GTK_STATE_INSENSITIVE];
264 case kColorId_ButtonHighlightColor: 267 case kColorId_ButtonHighlightColor:
265 return GetButtonStyle()->base[GTK_STATE_SELECTED]; 268 return GetButtonStyle()->base[GTK_STATE_SELECTED];
266 case kColorId_ButtonHoverColor: 269 case kColorId_ButtonHoverColor:
267 case kColorId_BlueButtonHoverColor: 270 case kColorId_BlueButtonHoverColor:
268 return GetButtonStyle()->text[GTK_STATE_PRELIGHT]; 271 return GetButtonStyle()->text[GTK_STATE_PRELIGHT];
269 case kColorId_ButtonHoverBackgroundColor: 272 case kColorId_ButtonHoverBackgroundColor:
270 return GetButtonStyle()->bg[GTK_STATE_PRELIGHT]; 273 return GetButtonStyle()->bg[GTK_STATE_PRELIGHT];
271 case kColorId_BlueButtonPressedColor: 274 case kColorId_BlueButtonPressedColor:
272 return GetButtonStyle()->text[GTK_STATE_ACTIVE]; 275 return GetButtonStyle()->text[GTK_STATE_ACTIVE];
276 case kColorId_BlueButtonShadowColor:
277 // Should be handled in GetSystemColor().
278 NOTREACHED();
279 return GetButtonStyle()->text[GTK_STATE_NORMAL];
273 280
274 // Textfield 281 // Textfield
275 case kColorId_TextfieldDefaultColor: 282 case kColorId_TextfieldDefaultColor:
276 return GetEntryStyle()->text[GTK_STATE_NORMAL]; 283 return GetEntryStyle()->text[GTK_STATE_NORMAL];
277 case kColorId_TextfieldDefaultBackground: 284 case kColorId_TextfieldDefaultBackground:
278 return GetEntryStyle()->base[GTK_STATE_NORMAL]; 285 return GetEntryStyle()->base[GTK_STATE_NORMAL];
279 case kColorId_TextfieldReadOnlyColor: 286 case kColorId_TextfieldReadOnlyColor:
280 return GetEntryStyle()->text[GTK_STATE_INSENSITIVE]; 287 return GetEntryStyle()->text[GTK_STATE_INSENSITIVE];
281 case kColorId_TextfieldReadOnlyBackground: 288 case kColorId_TextfieldReadOnlyBackground:
282 return GetEntryStyle()->base[GTK_STATE_INSENSITIVE]; 289 return GetEntryStyle()->base[GTK_STATE_INSENSITIVE];
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 0, 0, 483 0, 0,
477 rect.width(), rect.height()); 484 rect.width(), rect.height());
478 SkBitmap arrow = GdkPixbufToImageSkia(pb); 485 SkBitmap arrow = GdkPixbufToImageSkia(pb);
479 canvas->drawBitmap(arrow, rect.x(), rect.y()); 486 canvas->drawBitmap(arrow, rect.x(), rect.y());
480 487
481 g_object_unref(pb); 488 g_object_unref(pb);
482 g_object_unref(pm); 489 g_object_unref(pm);
483 } 490 }
484 491
485 } // namespace libgtk2ui 492 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « no previous file | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698