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

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

Issue 2813703003: Use NativeTheme to draw vertical menu separators. (Closed)
Patch Set: use rectf Created 3 years, 8 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/libgtkui/native_theme_gtk3.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/libgtkui/native_theme_gtk2.h" 5 #include "chrome/browser/ui/libgtkui/native_theme_gtk2.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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 case kColorId_SelectedMenuItemForegroundColor: 149 case kColorId_SelectedMenuItemForegroundColor:
150 return GetTextColor(GetMenuItem(), SELECTED); 150 return GetTextColor(GetMenuItem(), SELECTED);
151 case kColorId_FocusedMenuItemBackgroundColor: 151 case kColorId_FocusedMenuItemBackgroundColor:
152 return GetBgColor(GetMenuItem(), SELECTED); 152 return GetBgColor(GetMenuItem(), SELECTED);
153 153
154 case kColorId_EnabledMenuItemForegroundColor: 154 case kColorId_EnabledMenuItemForegroundColor:
155 return GetTextColor(GetMenuItem(), NORMAL); 155 return GetTextColor(GetMenuItem(), NORMAL);
156 case kColorId_MenuItemSubtitleColor: 156 case kColorId_MenuItemSubtitleColor:
157 case kColorId_DisabledMenuItemForegroundColor: 157 case kColorId_DisabledMenuItemForegroundColor:
158 return GetTextColor(GetMenuItem(), INSENSITIVE); 158 return GetTextColor(GetMenuItem(), INSENSITIVE);
159 case kColorId_FocusedMenuButtonBorderColor:
160 return GetBgColor(GetEntry(), NORMAL);
161 case kColorId_HoverMenuButtonBorderColor:
162 return GetTextAAColor(GetEntry(), PRELIGHT);
163 case kColorId_MenuBorderColor: 159 case kColorId_MenuBorderColor:
164 case kColorId_EnabledMenuButtonBorderColor: 160 case kColorId_MenuSeparatorColor:
165 case kColorId_MenuSeparatorColor: {
166 return GetTextColor(GetMenuItem(), INSENSITIVE); 161 return GetTextColor(GetMenuItem(), INSENSITIVE);
167 }
168 case kColorId_MenuBackgroundColor: 162 case kColorId_MenuBackgroundColor:
169 return GetBgColor(GetMenu(), NORMAL); 163 return GetBgColor(GetMenu(), NORMAL);
170 164
171 // Label 165 // Label
172 case kColorId_LabelEnabledColor: 166 case kColorId_LabelEnabledColor:
173 return GetTextColor(GetEntry(), NORMAL); 167 return GetTextColor(GetEntry(), NORMAL);
174 case kColorId_LabelDisabledColor: 168 case kColorId_LabelDisabledColor:
175 return GetTextColor(GetLabel(), INSENSITIVE); 169 return GetTextColor(GetLabel(), INSENSITIVE);
176 case kColorId_LabelTextSelectionColor: 170 case kColorId_LabelTextSelectionColor:
177 return GetTextColor(GetLabel(), SELECTED); 171 return GetTextColor(GetLabel(), SELECTED);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 GtkWidget* NativeThemeGtk2::GetSeparator() const { 454 GtkWidget* NativeThemeGtk2::GetSeparator() const {
461 static GtkWidget* fake_separator = nullptr; 455 static GtkWidget* fake_separator = nullptr;
462 456
463 if (!fake_separator) 457 if (!fake_separator)
464 fake_separator = gtk_hseparator_new(); 458 fake_separator = gtk_hseparator_new();
465 459
466 return fake_separator; 460 return fake_separator;
467 } 461 }
468 462
469 } // namespace libgtkui 463 } // namespace libgtkui
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/libgtkui/native_theme_gtk3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698