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