OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/about_chrome_dialog.h" | 5 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 gboolean OnEventBoxExpose(GtkWidget* event_box, | 81 gboolean OnEventBoxExpose(GtkWidget* event_box, |
82 GdkEventExpose* expose, | 82 GdkEventExpose* expose, |
83 gboolean user_data) { | 83 gboolean user_data) { |
84 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(event_box->window)); | 84 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(event_box->window)); |
85 gdk_cairo_rectangle(cr, &expose->area); | 85 gdk_cairo_rectangle(cr, &expose->area); |
86 cairo_clip(cr); | 86 cairo_clip(cr); |
87 | 87 |
88 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 88 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
89 gfx::CairoCachedSurface* background = | 89 gfx::CairoCachedSurface* background = |
90 rb.GetNativeImageNamed(IDR_ABOUT_BACKGROUND).ToCairo(); | 90 rb.GetNativeImageNamed(IDR_ABOUT_BACKGROUND_COLOR).ToCairo(); |
91 background->SetSource(cr, event_box, 0, 0); | 91 background->SetSource(cr, event_box, 0, 0); |
92 | 92 |
93 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); | 93 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); |
94 gdk_cairo_rectangle(cr, &expose->area); | 94 gdk_cairo_rectangle(cr, &expose->area); |
95 cairo_fill(cr); | 95 cairo_fill(cr); |
96 cairo_destroy(cr); | 96 cairo_destroy(cr); |
97 return FALSE; | 97 return FALSE; |
98 } | 98 } |
99 | 99 |
100 } // namespace | 100 } // namespace |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 ui::kContentAreaBorder, 0, | 270 ui::kContentAreaBorder, 0, |
271 ui::kContentAreaBorder, ui::kContentAreaBorder); | 271 ui::kContentAreaBorder, ui::kContentAreaBorder); |
272 gtk_container_add(GTK_CONTAINER(alignment), vbox); | 272 gtk_container_add(GTK_CONTAINER(alignment), vbox); |
273 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); | 273 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); |
274 | 274 |
275 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); | 275 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); |
276 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 276 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
277 gtk_widget_show_all(dialog); | 277 gtk_widget_show_all(dialog); |
278 gtk_widget_grab_focus(close_button); | 278 gtk_widget_grab_focus(close_button); |
279 } | 279 } |
OLD | NEW |