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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 2815303004: Update the Windows iOS promotion to have the same width as the bubble that appears before it. (Closed)
Patch Set: Same width bubble Created 3 years, 8 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: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index 31b70dac9c8aff19cd40e29dffdb63dfc4cca9b8..50a69f0ab2d6b058e3c40c1c651655098ec59b0a 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -829,15 +829,23 @@ bool ManagePasswordsBubbleView::ShouldShowCloseButton() const {
}
void ManagePasswordsBubbleView::Refresh() {
+ gfx::Rect bubble_bounds = GetBubbleBounds();
RemoveAllChildViews(true);
initially_focused_view_ = NULL;
CreateChild();
-
// Show/hide the close button.
GetWidget()->non_client_view()->ResetWindowControls();
GetWidget()->UpdateWindowIcon();
GetWidget()->UpdateWindowTitle();
- SizeToContents();
+ if (model_.state() == password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) {
+ // Update the height and keep the existing width.
+ bubble_bounds.set_height(
+ GetWidget()->GetRootView()->GetHeightForWidth(bubble_bounds.width()));
+ GetWidget()->SetBounds(bubble_bounds);
+ GetWidget()->GetRootView()->Layout();
+ } else {
+ SizeToContents();
+ }
}
void ManagePasswordsBubbleView::CreateChild() {

Powered by Google App Engine
This is Rietveld 408576698