summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc8
-rw-r--r--chrome/browser/gtk/slide_animator_gtk.cc10
2 files changed, 5 insertions, 13 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index 9c784d3..e8e70d3 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -476,12 +476,8 @@ void FindBarGtk::OnFixedSizeAllocate(GtkWidget* fixed,
GtkAllocation* allocation,
FindBarGtk* findbar) {
// Set the background widget to the size of |fixed|.
- if (findbar->border_->allocation.width != allocation->width) {
- // Typically it's not a good idea to use this function outside of container
- // implementations, but GtkFixed doesn't do any sizing on its children so
- // in this case it's safe.
- gtk_widget_size_allocate(findbar->border_, allocation);
- }
+ gtk_widget_set_size_request(findbar->border_,
+ allocation->width, allocation->height);
// Reposition the dialog.
GtkWidget* dialog = findbar->slide_widget();
diff --git a/chrome/browser/gtk/slide_animator_gtk.cc b/chrome/browser/gtk/slide_animator_gtk.cc
index cea09b6..d978316 100644
--- a/chrome/browser/gtk/slide_animator_gtk.cc
+++ b/chrome/browser/gtk/slide_animator_gtk.cc
@@ -13,13 +13,9 @@ namespace {
void OnFixedSizeAllocate(GtkWidget* fixed,
GtkAllocation* allocation,
GtkWidget* child) {
- if (allocation->width != child->allocation.width) {
- // The size of the GtkFixed has changed. We want |child_| to match widths,
- // but the height should not change.
- GtkAllocation new_allocation = child->allocation;
- new_allocation.width = allocation->width;
- gtk_widget_size_allocate(child, &new_allocation);
- }
+ // The size of the GtkFixed has changed. We want |child_| to match widths,
+ // but the height should not change.
+ gtk_widget_set_size_request(child, allocation->width, -1);
}
} // namespace