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

Side by Side Diff: chrome/browser/ui/gtk/infobars/infobar_gtk.cc

Issue 12742013: Inconsistent use of [x] close panel icon. Code changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_217094_3
Patch Set: Created 7 years, 9 months 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
OLDNEW
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/infobars/infobar_gtk.h" 5 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Add the icon on the left, if any. 76 // Add the icon on the left, if any.
77 gfx::Image* icon = delegate->GetIcon(); 77 gfx::Image* icon = delegate->GetIcon();
78 if (icon) { 78 if (icon) {
79 GtkWidget* image = gtk_image_new_from_pixbuf(icon->ToGdkPixbuf()); 79 GtkWidget* image = gtk_image_new_from_pixbuf(icon->ToGdkPixbuf());
80 80
81 gtk_misc_set_alignment(GTK_MISC(image), 0.5, 0.5); 81 gtk_misc_set_alignment(GTK_MISC(image), 0.5, 0.5);
82 82
83 gtk_box_pack_start(GTK_BOX(hbox_), image, FALSE, FALSE, 0); 83 gtk_box_pack_start(GTK_BOX(hbox_), image, FALSE, FALSE, 0);
84 } 84 }
85 85
86 close_button_.reset(CustomDrawButton::CloseButton(theme_service_)); 86 close_button_.reset(CustomDrawButton::CloseButtonBar(theme_service_));
87 gtk_util::CenterWidgetInHBox(hbox_, close_button_->widget(), true, 0); 87 gtk_util::CenterWidgetInHBox(hbox_, close_button_->widget(), true, 0);
88 signals_->Connect(close_button_->widget(), "clicked", 88 signals_->Connect(close_button_->widget(), "clicked",
89 G_CALLBACK(OnCloseButtonThunk), this); 89 G_CALLBACK(OnCloseButtonThunk), this);
90 90
91 widget_.Own(gtk_expanded_container_new()); 91 widget_.Own(gtk_expanded_container_new());
92 gtk_container_add(GTK_CONTAINER(widget_.get()), bg_box_); 92 gtk_container_add(GTK_CONTAINER(widget_.get()), bg_box_);
93 gtk_widget_set_size_request(widget_.get(), -1, 0); 93 gtk_widget_set_size_request(widget_.get(), -1, 0);
94 94
95 g_signal_connect(widget_.get(), "child-size-request", 95 g_signal_connect(widget_.get(), "child-size-request",
96 G_CALLBACK(OnChildSizeRequestThunk), 96 G_CALLBACK(OnChildSizeRequestThunk),
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 const content::NotificationSource& source, 306 const content::NotificationSource& source,
307 const content::NotificationDetails& details) { 307 const content::NotificationDetails& details) {
308 UpdateBorderColor(); 308 UpdateBorderColor();
309 } 309 }
310 310
311 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded, 311 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded,
312 GtkWidget* child, 312 GtkWidget* child,
313 GtkRequisition* requisition) { 313 GtkRequisition* requisition) {
314 requisition->height = -1; 314 requisition->height = -1;
315 } 315 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/find_bar_gtk.cc ('k') | chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698