Chromium Code Reviews| Index: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| index 868cc391fe38a2c3694ec6a20c1893f204d24bce..3fabecf41de828724fb6481d4769baf3677dfc48 100644 |
| --- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| +++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc |
| @@ -97,8 +97,8 @@ const int kPermissionsSectionHeadlineMarginBottom = 10; |
| // is the space between these rows. |
| const int kPermissionsSectionRowSpacing = 2; |
| -// The max width of the popup. |
| -const int kPopupWidth = 310; |
| +// The min width of the popup. |
| +const int kMinPopupWidth = 310; |
| const int kSiteDataIconColumnWidth = 20; |
| const int kSiteDataSectionRowSpacing = 11; |
| @@ -406,7 +406,19 @@ gfx::Size WebsiteSettingsPopupView::GetPreferredSize() { |
| height += header_->GetPreferredSize().height(); |
| if (tabbed_pane_) |
| height += tabbed_pane_->GetPreferredSize().height(); |
| - return gfx::Size(kPopupWidth, height); |
| + |
| + int width = kMinPopupWidth - kPermissionsSectionPaddingLeft; |
|
msw
2012/11/07 22:43:08
nit: replace kMinPopupWidth with a kMinContentWidt
markusheintz_
2012/11/08 16:38:47
Done.
|
| + if (site_data_content_ && |
| + width < site_data_content_->GetPreferredSize().width()) { |
| + width = site_data_content_->GetPreferredSize().width(); |
|
msw
2012/11/07 22:43:08
nit: nix the width comparison and do std::max here
markusheintz_
2012/11/08 16:38:47
Done.
|
| + } |
| + if (permissions_content_ && |
| + width < permissions_content_->GetPreferredSize().width()) { |
| + width = permissions_content_->GetPreferredSize().width(); |
| + } |
| + width += kPermissionsSectionPaddingLeft; |
| + |
| + return gfx::Size(width, height); |
| } |
| void WebsiteSettingsPopupView::SetCookieInfo( |