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

Side by Side Diff: chrome/browser/gtk/theme_install_bubble_view_gtk.cc

Issue 361006: Switch theme loading to use its own string.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/theme_install_bubble_view_gtk.h" 5 #include "chrome/browser/gtk/theme_install_bubble_view_gtk.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "app/gfx/gtk_util.h" 9 #include "app/gfx/gtk_util.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 gtk_widget_destroy(widget_); 81 gtk_widget_destroy(widget_);
82 instance_ = NULL; 82 instance_ = NULL;
83 } 83 }
84 84
85 void ThemeInstallBubbleViewGtk::InitWidgets() { 85 void ThemeInstallBubbleViewGtk::InitWidgets() {
86 // Widgematically, the bubble is just a label in a popup window. 86 // Widgematically, the bubble is just a label in a popup window.
87 widget_ = gtk_window_new(GTK_WINDOW_POPUP); 87 widget_ = gtk_window_new(GTK_WINDOW_POPUP);
88 gtk_container_set_border_width(GTK_CONTAINER(widget_), kTextPadding); 88 gtk_container_set_border_width(GTK_CONTAINER(widget_), kTextPadding);
89 GtkWidget* label = gtk_label_new(NULL); 89 GtkWidget* label = gtk_label_new(NULL);
90 90
91 // Need our own copy of the "Loading..." string: http://crbug.com/24177
92 gchar* markup = g_markup_printf_escaped( 91 gchar* markup = g_markup_printf_escaped(
93 "<span size='xx-large'>%s</span>", 92 "<span size='xx-large'>%s</span>",
94 l10n_util::GetStringUTF8(IDS_TAB_LOADING_TITLE).c_str()); 93 l10n_util::GetStringUTF8(IDS_THEME_LOADING_TITLE).c_str());
95 gtk_label_set_markup(GTK_LABEL(label), markup); 94 gtk_label_set_markup(GTK_LABEL(label), markup);
96 g_free(markup); 95 g_free(markup);
97 96
98 gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &gfx::kGdkWhite); 97 gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &gfx::kGdkWhite);
99 gtk_container_add(GTK_CONTAINER(widget_), label); 98 gtk_container_add(GTK_CONTAINER(widget_), label);
100 99
101 bool composited = false; 100 bool composited = false;
102 if (gtk_util::IsScreenComposited()) { 101 if (gtk_util::IsScreenComposited()) {
103 composited = true; 102 composited = true;
104 GdkScreen* screen = gtk_widget_get_screen(widget_); 103 GdkScreen* screen = gtk_widget_get_screen(widget_);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 0, M_PI_2); 173 0, M_PI_2);
175 cairo_arc(cr, inner_rect.x(), inner_rect.bottom(), inset, 174 cairo_arc(cr, inner_rect.x(), inner_rect.bottom(), inset,
176 M_PI_2, M_PI); 175 M_PI_2, M_PI);
177 176
178 cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, kBubbleOpacity); 177 cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, kBubbleOpacity);
179 cairo_fill(cr); 178 cairo_fill(cr);
180 cairo_destroy(cr); 179 cairo_destroy(cr);
181 180
182 return FALSE; 181 return FALSE;
183 } 182 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/theme_install_bubble_view.mm ('k') | chrome/browser/views/theme_install_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698