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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 if (theme_thumb_active) | 563 if (theme_thumb_active) |
564 *thumb_active_color = *theme_thumb_active; | 564 *thumb_active_color = *theme_thumb_active; |
565 | 565 |
566 if (theme_thumb_inactive) | 566 if (theme_thumb_inactive) |
567 *thumb_inactive_color = *theme_thumb_inactive; | 567 *thumb_inactive_color = *theme_thumb_inactive; |
568 | 568 |
569 if (theme_trough_color) | 569 if (theme_trough_color) |
570 *track_color = *theme_trough_color; | 570 *track_color = *theme_trough_color; |
571 } | 571 } |
572 | 572 |
573 gfx::CairoCachedSurface* GtkThemeService::GetRTLEnabledSurfaceNamed( | |
574 int id, | |
575 GtkWidget* widget_on_display) { | |
576 // We flip the sign of |id| when passing it to GetSurfaceNamedImpl() for the | |
577 // same reason that ThemeService::GetPixbufImpl() does: so that if one | |
578 // location calls this function with a resource ID, and another place calls | |
579 // GetSurfaceNamed() with the same ID, they'll correctly get different | |
580 // surfaces in RTL mode. | |
581 return GetSurfaceNamedImpl( | |
582 -id, | |
583 &per_display_surfaces_, | |
584 &GtkThemeService::GetRTLEnabledPixbufNamedWrapper, | |
585 widget_on_display); | |
586 } | |
587 | |
588 gfx::CairoCachedSurface* GtkThemeService::GetCairoIcon( | 573 gfx::CairoCachedSurface* GtkThemeService::GetCairoIcon( |
589 int id, | 574 int id, |
590 GtkWidget* widget_on_display) { | 575 GtkWidget* widget_on_display) { |
591 return GetSurfaceNamedImpl(id, | 576 return GetSurfaceNamedImpl(id, |
592 &per_display_icon_surfaces_, | 577 &per_display_icon_surfaces_, |
593 &GtkThemeService::GetPixbufForIconId, | 578 &GtkThemeService::GetPixbufForIconId, |
594 widget_on_display); | 579 widget_on_display); |
595 } | 580 } |
596 | 581 |
597 // static | 582 // static |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 cairo_new_path(cr); | 1213 cairo_new_path(cr); |
1229 cairo_set_line_width(cr, 1.0); | 1214 cairo_set_line_width(cr, 1.0); |
1230 cairo_move_to(cr, start_x, allocation.y); | 1215 cairo_move_to(cr, start_x, allocation.y); |
1231 cairo_line_to(cr, start_x, allocation.y + allocation.height); | 1216 cairo_line_to(cr, start_x, allocation.y + allocation.height); |
1232 cairo_stroke(cr); | 1217 cairo_stroke(cr); |
1233 cairo_destroy(cr); | 1218 cairo_destroy(cr); |
1234 cairo_pattern_destroy(pattern); | 1219 cairo_pattern_destroy(pattern); |
1235 | 1220 |
1236 return TRUE; | 1221 return TRUE; |
1237 } | 1222 } |
OLD | NEW |