Index: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
index 4abe60c7c68684c4ea339439a1923b18e5df36a6..cdbd9431887519ea93c6504bb51cc8d4cc7f43ae 100644 |
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc |
@@ -249,12 +249,19 @@ gfx::Size IconLabelBubbleView::GetSizeForLabelWidth(int label_width) const { |
// fully showing both label and icon, stay there, then shrink to just large |
// enough to show the icon. We don't want to shrink all the way back to |
// zero, since this would mean the view would completely disappear and then |
- // pop back to an icon after the animation finishes. |
- const int max_width = GetImageTrailingEdge() + GetInternalSpacing() + |
- label_width + post_label_width; |
- const int current_width = WidthMultiplier() * max_width; |
- size.set_width(shrinking ? std::max(current_width, size.width()) |
- : current_width); |
+ // pop back to an icon after the animation finishes. Thus, while shrinking, |
+ // |multiplier| only refers to the label, separator and padding - the only |
+ // parts which, in fact, shrink. |
+ int current_width; |
+ if (shrinking) { |
+ current_width = GetImageTrailingEdge() + GetInternalSpacing() + |
+ (label_width + post_label_width) * WidthMultiplier(); |
+ } else { |
+ const int max_width = GetImageTrailingEdge() + GetInternalSpacing() + |
+ label_width + post_label_width; |
+ current_width = WidthMultiplier() * max_width; |
+ } |
+ size.set_width(current_width); |
Peter Kasting
2016/08/15 23:29:49
It seems like there are two effects this change ha
Kevin Bailey
2016/08/16 16:39:36
Done, but see comment in location_icon_view.cc.
|
} |
return size; |
} |