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

Side by Side Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 8511041: GTK: Use IDR_THEME_WINDOW_CONTROL_BACKGROUND when drawing min/max/close and new tab buttons. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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/gtk/browser_titlebar.cc ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.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 1
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 6 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // Before we start setting images and values, we have to clear out old, stale 746 // Before we start setting images and values, we have to clear out old, stale
747 // values. (If we don't do this, we'll regress startup time in the case where 747 // values. (If we don't do this, we'll regress startup time in the case where
748 // someone installs a heavyweight theme, then goes back to GTK.) 748 // someone installs a heavyweight theme, then goes back to GTK.)
749 profile()->GetPrefs()->ClearPref(prefs::kCurrentThemeImages); 749 profile()->GetPrefs()->ClearPref(prefs::kCurrentThemeImages);
750 750
751 GtkStyle* frame_style = gtk_rc_get_style(fake_frame_); 751 GtkStyle* frame_style = gtk_rc_get_style(fake_frame_);
752 752
753 GtkStyle* window_style = gtk_rc_get_style(fake_window_); 753 GtkStyle* window_style = gtk_rc_get_style(fake_window_);
754 SetThemeColorFromGtk(ThemeService::COLOR_CONTROL_BACKGROUND, 754 SetThemeColorFromGtk(ThemeService::COLOR_CONTROL_BACKGROUND,
755 &window_style->bg[GTK_STATE_NORMAL]); 755 &window_style->bg[GTK_STATE_NORMAL]);
756 SetThemeColorFromGtk(ThemeService::COLOR_BUTTON_BACKGROUND,
Elliot Glaysher 2011/11/10 00:54:10 This call is simply wrong. It should be transparen
757 &window_style->bg[GTK_STATE_NORMAL]);
758 756
759 GdkColor toolbar_color = window_style->bg[GTK_STATE_NORMAL]; 757 GdkColor toolbar_color = window_style->bg[GTK_STATE_NORMAL];
760 SetThemeColorFromGtk(ThemeService::COLOR_TOOLBAR, &toolbar_color); 758 SetThemeColorFromGtk(ThemeService::COLOR_TOOLBAR, &toolbar_color);
761 759
762 GdkColor button_color = window_style->bg[GTK_STATE_SELECTED]; 760 GdkColor button_color = window_style->bg[GTK_STATE_SELECTED];
763 SetThemeTintFromGtk(ThemeService::TINT_BUTTONS, &button_color); 761 SetThemeTintFromGtk(ThemeService::TINT_BUTTONS, &button_color);
764 762
765 GtkStyle* label_style = gtk_rc_get_style(fake_label_.get()); 763 GtkStyle* label_style = gtk_rc_get_style(fake_label_.get());
766 GdkColor label_color = label_style->fg[GTK_STATE_NORMAL]; 764 GdkColor label_color = label_style->fg[GTK_STATE_NORMAL];
767 SetThemeColorFromGtk(ThemeService::COLOR_TAB_TEXT, &label_color); 765 SetThemeColorFromGtk(ThemeService::COLOR_TAB_TEXT, &label_color);
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 cairo_set_line_width(cr, 1.0); 1238 cairo_set_line_width(cr, 1.0);
1241 cairo_move_to(cr, start_x, widget->allocation.y); 1239 cairo_move_to(cr, start_x, widget->allocation.y);
1242 cairo_line_to(cr, start_x, 1240 cairo_line_to(cr, start_x,
1243 widget->allocation.y + widget->allocation.height); 1241 widget->allocation.y + widget->allocation.height);
1244 cairo_stroke(cr); 1242 cairo_stroke(cr);
1245 cairo_destroy(cr); 1243 cairo_destroy(cr);
1246 cairo_pattern_destroy(pattern); 1244 cairo_pattern_destroy(pattern);
1247 1245
1248 return TRUE; 1246 return TRUE;
1249 } 1247 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_titlebar.cc ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698