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

Unified Diff: chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc

Issue 8952002: GTK: Remove more deprecated stuff. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix spaces Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
diff --git a/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc b/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
index e549f8640a72a08c9fc0c75f15369573f87e2ed8..138ba39109d46dd691cb370b7ed57d0558464d55 100644
--- a/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
+++ b/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
@@ -86,7 +86,10 @@ void ChildSizeAllocate(GtkWidget* child, gpointer userdata) {
}
}
- if (child_allocation.width != child->allocation.width) {
+ GtkAllocation current_allocation;
+ gtk_widget_get_allocation(child, &current_allocation);
+
+ if (child_allocation.width != current_allocation.width) {
if (data->box->hide_child_directly || child_allocation.width <= 1)
gtk_widget_hide(child);
else
@@ -177,11 +180,14 @@ static void gtk_chrome_shrinkable_hbox_size_allocate(
gtk_container_foreach(GTK_CONTAINER(widget), SumChildrenWidthRequisition,
&children_width_requisition);
+ GtkAllocation widget_allocation;
+ gtk_widget_get_allocation(widget, &widget_allocation);
+
// If we are allocated to more width or some children are removed or shrunk,
// then we need to show all invisible children before calling parent class's
// size_allocate method, because the new width may be enough to show those
// hidden children.
- if (widget->allocation.width < allocation->width ||
+ if (widget_allocation.width < allocation->width ||
box->children_width_requisition > children_width_requisition) {
gtk_container_foreach(GTK_CONTAINER(widget),
reinterpret_cast<GtkCallback>(gtk_widget_show), NULL);
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698