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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.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/rounded_window.cc ('k') | chrome/browser/ui/panels/panel_browser_window_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index 0aeaac3b1e10442ce2491efb31a913cd2b6e87f5..4412a0e8b9278510ad6ed3d14888b20502b2beb3 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -921,8 +921,10 @@ void TabStripGtk::SetVerticalOffset(int offset) {
gfx::Point TabStripGtk::GetTabStripOriginForWidget(GtkWidget* target) {
int x, y;
+ GtkAllocation widget_allocation;
+ gtk_widget_get_allocation(widget(), &widget_allocation);
if (!gtk_widget_translate_coordinates(widget(), target,
- -widget()->allocation.x, 0, &x, &y)) {
+ -widget_allocation.x, 0, &x, &y)) {
// If the tab strip isn't showing, give the coordinates relative to the
// toplevel instead.
if (!gtk_widget_translate_coordinates(
@@ -931,10 +933,10 @@ gfx::Point TabStripGtk::GetTabStripOriginForWidget(GtkWidget* target) {
}
}
if (!gtk_widget_get_has_window(target)) {
- GtkAllocation allocation;
- gtk_widget_get_allocation(target, &allocation);
- x += allocation.x;
- y += allocation.y;
+ GtkAllocation target_allocation;
+ gtk_widget_get_allocation(target, &target_allocation);
+ x += target_allocation.x;
+ y += target_allocation.y;
}
return gfx::Point(x, y);
}
@@ -1489,7 +1491,9 @@ void TabStripGtk::GetDesiredTabWidths(int tab_count,
}
// Determine how much space we can actually allocate to tabs.
- int available_width = tabstrip_->allocation.width;
+ GtkAllocation tabstrip_allocation;
+ gtk_widget_get_allocation(tabstrip_.get(), &tabstrip_allocation);
+ int available_width = tabstrip_allocation.width;
if (available_width_for_tabs_ < 0) {
available_width = bounds_.width();
available_width -=
« no previous file with comments | « chrome/browser/ui/gtk/rounded_window.cc ('k') | chrome/browser/ui/panels/panel_browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698