Index: chrome/browser/ui/gtk/web_intent_picker_gtk.cc |
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc |
index aa74d13fdc5fb8c2715dc405d383d5f5be429a01..f80e6aaf7f70d3464f054d56c01c5e994690a406 100644 |
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc |
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc |
@@ -242,7 +242,6 @@ void WebIntentPickerGtk::OnInlineDisposition(WebIntentPickerModel* model, |
std::string()); |
// Replace the picker contents with the inline disposition. |
- |
gtk_util::RemoveAllChildren(contents_); |
GtkWidget* service_hbox = gtk_hbox_new(FALSE, ui::kControlSpacing); |
@@ -266,17 +265,24 @@ void WebIntentPickerGtk::OnInlineDisposition(WebIntentPickerModel* model, |
// The separator between the icon/title/close and the inline renderer. |
gtk_box_pack_start(GTK_BOX(vbox), gtk_hseparator_new(), FALSE, TRUE, 0); |
- gtk_box_pack_end(GTK_BOX(vbox), tab_contents_container_->widget(), |
- TRUE, TRUE, 0); |
- |
+ // hbox for the web contents, so we can have spacing on the borders. |
+ GtkWidget* content_hbox_ = gtk_hbox_new(FALSE, ui::kControlSpacing); |
Evan Stade
2012/05/18 20:35:19
use an alignment for this
groby-ooo-7-16
2012/05/18 21:07:22
Done.
|
+ gtk_box_pack_start(GTK_BOX(content_hbox_), tab_contents_container_->widget(), |
+ TRUE, TRUE, ui::kControlSpacing); |
+ gtk_box_pack_end(GTK_BOX(vbox), content_hbox_, TRUE, TRUE, 0); |
gtk_container_add(GTK_CONTAINER(contents_), vbox); |
- gfx::Size size = GetDefaultInlineDispositionSize(web_contents); |
+ gfx::Size size = GetMinInlineDispositionSize(); |
gtk_widget_set_size_request(tab_contents_container_->widget(), |
size.width(), size.height()); |
gtk_widget_show_all(contents_); |
} |
+void WebIntentPickerGtk::OnInlineDispositionAutoResize(const gfx::Size& size) { |
+ gtk_widget_set_size_request(tab_contents_container_->widget(), |
+ size.width(), size.height()); |
+} |
+ |
GtkWidget* WebIntentPickerGtk::GetWidgetRoot() { |
return contents_; |
} |