| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gtk/gtk_theme_service.h" | 5 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 // Some GTK themes only define the text selection colors on the GtkEntry | 808 // Some GTK themes only define the text selection colors on the GtkEntry |
| 809 // class, so we need to use that for getting selection colors. | 809 // class, so we need to use that for getting selection colors. |
| 810 active_selection_bg_color_ = | 810 active_selection_bg_color_ = |
| 811 gfx::GdkColorToSkColor(entry_style->base[GTK_STATE_SELECTED]); | 811 gfx::GdkColorToSkColor(entry_style->base[GTK_STATE_SELECTED]); |
| 812 active_selection_fg_color_ = | 812 active_selection_fg_color_ = |
| 813 gfx::GdkColorToSkColor(entry_style->text[GTK_STATE_SELECTED]); | 813 gfx::GdkColorToSkColor(entry_style->text[GTK_STATE_SELECTED]); |
| 814 inactive_selection_bg_color_ = | 814 inactive_selection_bg_color_ = |
| 815 gfx::GdkColorToSkColor(entry_style->base[GTK_STATE_ACTIVE]); | 815 gfx::GdkColorToSkColor(entry_style->base[GTK_STATE_ACTIVE]); |
| 816 inactive_selection_fg_color_ = | 816 inactive_selection_fg_color_ = |
| 817 gfx::GdkColorToSkColor(entry_style->text[GTK_STATE_ACTIVE]); | 817 gfx::GdkColorToSkColor(entry_style->text[GTK_STATE_ACTIVE]); |
| 818 location_bar_bg_color_ = |
| 819 gfx::GdkColorToSkColor(entry_style->base[GTK_STATE_NORMAL]); |
| 820 location_bar_text_color_ = |
| 821 gfx::GdkColorToSkColor(entry_style->text[GTK_STATE_NORMAL]); |
| 818 } | 822 } |
| 819 | 823 |
| 820 GdkColor GtkThemeService::BuildFrameColors(GtkStyle* frame_style) { | 824 GdkColor GtkThemeService::BuildFrameColors(GtkStyle* frame_style) { |
| 821 GdkColor* theme_frame = NULL; | 825 GdkColor* theme_frame = NULL; |
| 822 GdkColor* theme_inactive_frame = NULL; | 826 GdkColor* theme_inactive_frame = NULL; |
| 823 GdkColor* theme_incognito_frame = NULL; | 827 GdkColor* theme_incognito_frame = NULL; |
| 824 GdkColor* theme_incognito_inactive_frame = NULL; | 828 GdkColor* theme_incognito_inactive_frame = NULL; |
| 825 gtk_widget_style_get(GTK_WIDGET(fake_frame_), | 829 gtk_widget_style_get(GTK_WIDGET(fake_frame_), |
| 826 "frame-color", &theme_frame, | 830 "frame-color", &theme_frame, |
| 827 "inactive-frame-color", &theme_inactive_frame, | 831 "inactive-frame-color", &theme_inactive_frame, |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 cairo_new_path(cr); | 1157 cairo_new_path(cr); |
| 1154 cairo_set_line_width(cr, 1.0); | 1158 cairo_set_line_width(cr, 1.0); |
| 1155 cairo_move_to(cr, start_x, allocation.y); | 1159 cairo_move_to(cr, start_x, allocation.y); |
| 1156 cairo_line_to(cr, start_x, allocation.y + allocation.height); | 1160 cairo_line_to(cr, start_x, allocation.y + allocation.height); |
| 1157 cairo_stroke(cr); | 1161 cairo_stroke(cr); |
| 1158 cairo_destroy(cr); | 1162 cairo_destroy(cr); |
| 1159 cairo_pattern_destroy(pattern); | 1163 cairo_pattern_destroy(pattern); |
| 1160 | 1164 |
| 1161 return TRUE; | 1165 return TRUE; |
| 1162 } | 1166 } |
| OLD | NEW |