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

Unified Diff: chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: missed a merge problem Created 3 years, 7 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 | « ash/shell/window_type_launcher.cc ('k') | chrome/browser/ui/views/collected_cookies_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
diff --git a/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc b/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
index 24c926314434ae60b20bb165e916992f5e07f79e..12f6310579dc8632359a6589273f1098482b7a28 100644
--- a/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
+++ b/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
@@ -13,6 +13,7 @@
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/views/border.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/grid_layout.h"
@@ -28,8 +29,6 @@ const int kDefaultWidth = 600;
const int kDefaultHeight = 250;
const int kPaddingToMessage = 20;
-const int kInset = 40;
-const int kTopInset = 10;
////////////////////////////////////////////////////////////////////////////////
// Dialog for an aborted multi-profile session due to a user policy change .
@@ -113,11 +112,13 @@ gfx::Size MultiprofilesSessionAbortedView::GetPreferredSize() const {
void MultiprofilesSessionAbortedView::InitDialog(
const std::string& user_email) {
- const gfx::Insets kDialogInsets(kTopInset, kInset, kInset, kInset);
-
+ constexpr int kTopInset = 10;
+ constexpr int kOtherInset = 40;
// Create the views and layout manager and set them up.
- views::GridLayout* grid_layout = views::GridLayout::CreatePanel(this);
- grid_layout->SetInsets(kDialogInsets);
+ views::GridLayout* grid_layout = new views::GridLayout(this);
+ SetLayoutManager(grid_layout);
+ SetBorder(views::CreateEmptyBorder(kTopInset, kOtherInset, kOtherInset,
+ kOtherInset));
views::ColumnSet* column_set = grid_layout->AddColumnSet(0);
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | chrome/browser/ui/views/collected_cookies_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698