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

Unified Diff: ui/views/bubble/bubble_dialog_delegate.cc

Issue 2692113002: harmony: fix sizing on webusb chooser dialog (Closed)
Patch Set: Created 3 years, 10 months 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
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 735a2237bcb536fb0bb272a2fa06b6abff199ae6..c79301f31af25aec49f0151b2c027b8eefdcf1ef 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -231,9 +231,10 @@ gfx::Rect BubbleDialogDelegateView::GetBubbleBounds() {
// The argument rect has its origin at the bubble's arrow anchor point;
// its size is the preferred size of the bubble's client view (this view).
bool anchor_minimized = anchor_widget() && anchor_widget()->IsMinimized();
+ gfx::Size size = GetWidget()->client_view()->GetPreferredSize();
+ size.SetToMax(GetMinimumSize());
return GetBubbleFrameView()->GetUpdatedWindowBounds(
- GetAnchorRect(), GetWidget()->client_view()->GetPreferredSize(),
- adjust_if_offscreen_ && !anchor_minimized);
+ GetAnchorRect(), size, adjust_if_offscreen_ && !anchor_minimized);
}
const gfx::FontList& BubbleDialogDelegateView::GetTitleFontList() const {

Powered by Google App Engine
This is Rietveld 408576698