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

Unified Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 2640593002: Fix alignment of title/content on the OIB / Site Settings bubble. (Closed)
Patch Set: respond to comments Created 3 years, 11 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
« no previous file with comments | « no previous file | ui/views/bubble/bubble_dialog_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4f40722ec62999304e3937bfdaacaec8bd4e6609..2409e1656c13d7ca731e5ab532e3b465ca1e8a1d 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
@@ -78,12 +78,6 @@ WebsiteSettingsPopupView::PopupType g_shown_popup_type =
const int kMinPopupWidth = 320;
const int kMaxPopupWidth = 1000;
-// Margin and padding values shared by all sections.
-const int kSectionPaddingHorizontal = views::kPanelHorizMargin;
-
-// Padding for the bottom of the bubble.
-const int kPopupMarginBottom = views::kPanelVertMargin;
-
// Security Section (PopupHeaderView) ------------------------------------------
// Margin and padding values for the |PopupHeaderView|.
@@ -196,10 +190,8 @@ PopupHeaderView::PopupHeaderView(
const int label_column_status = 1;
views::ColumnSet* column_set_status =
layout->AddColumnSet(label_column_status);
- column_set_status->AddPaddingColumn(0, kSectionPaddingHorizontal);
column_set_status->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
1, views::GridLayout::USE_PREF, 0, 0);
- column_set_status->AddPaddingColumn(0, kSectionPaddingHorizontal);
layout->AddPaddingRow(0, kHeaderLabelSpacing);
@@ -435,8 +427,16 @@ WebsiteSettingsPopupView::WebsiteSettingsPopupView(
site_settings_view_ = CreateSiteSettingsView();
layout->AddView(site_settings_view_);
- // Each section handles its own padding.
- set_margins(gfx::Insets(0, 0, kPopupMarginBottom, 0));
+ // Remove the top margin from the client area so there is less space below the
+ // dialog title.
+ set_margins(
+ gfx::Insets(0, margins().left(), margins().bottom(), margins().right()));
+ if (!ui::MaterialDesignController::IsSecondaryUiMaterial()) {
+ // In non-material, titles are inset from the dialog margin. Ensure the
+ // horizontal insets match.
+ set_title_margins(gfx::Insets(views::kPanelVertMargin, margins().left(), 0,
+ margins().right()));
+ }
views::BubbleDialogDelegateView::CreateBubble(this);
presenter_.reset(new WebsiteSettings(
@@ -688,8 +688,6 @@ views::View* WebsiteSettingsPopupView::CreateSiteSettingsView() {
site_settings_view->SetLayoutManager(box_layout);
box_layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH);
- box_layout->set_inside_border_insets(
- gfx::Insets(0, kSectionPaddingHorizontal));
// Add cookies view.
cookies_view_ = new views::View();
« no previous file with comments | « no previous file | ui/views/bubble/bubble_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698