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

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

Issue 8885016: GTK: Even more changes from raw allocation access to gtk_widget_get_allocation(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove temporary 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/infobars/infobar_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 83407dee99186d8091f73190f71619c5c002adae..abbfb8cb711b854c69bbe42956a32f1b3d44e76d 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -915,8 +915,12 @@ void LocationBarViewGtk::UpdateEVCertificateLabelSize() {
// The EV label should never take up more than half the hbox. We try to
// correct our inaccurate measurement units ("the average character width")
// by dividing more than an even 2.
- int text_area = security_info_label_->allocation.width +
- entry_box_->allocation.width;
+ GtkAllocation security_label_allocation;
+ gtk_widget_get_allocation(security_info_label_, &security_label_allocation);
+ GtkAllocation entry_box_allocation;
+ gtk_widget_get_allocation(entry_box_, &entry_box_allocation);
+ int text_area = security_label_allocation.width +
+ entry_box_allocation.width;
int max_chars = static_cast<int>(static_cast<float>(text_area) /
static_cast<float>(char_width) / 2.75);
// Don't let the label be smaller than 10 characters so that the country
« no previous file with comments | « chrome/browser/ui/gtk/infobars/infobar_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698