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

Unified Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 2668853002: Use the CreatePanelLayout() utility method instead of hand-rolling panel layout. (Closed)
Patch Set: Fix compile 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 | « chrome/browser/chromeos/options/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/options/wifi_config_view.cc
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index 3dc1be81302ef98394f4fc67ce75634786fa99c5..8bfbc5a7078b7c4b226580bde9e0032add64e686 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/chromeos/options/passphrase_textfield.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include "chrome/browser/ui/views/layout_utils.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "chromeos/login/login_state.h"
@@ -934,18 +935,8 @@ void WifiConfigView::Init(bool show_8021x) {
ParseUIProperty(&passphrase_ui_data_, network, ::onc::wifi::kPassphrase);
}
- views::GridLayout* layout = new views::GridLayout(this);
+ views::GridLayout* layout = layout_utils::CreatePanelLayout(this);
LayoutDelegate* delegate = LayoutDelegate::Get();
- layout->SetInsets(gfx::Insets(
- delegate->GetLayoutDistance(
- LayoutDelegate::LayoutDistanceType::PANEL_HORIZ_MARGIN),
- delegate->GetLayoutDistance(
- LayoutDelegate::LayoutDistanceType::PANEL_VERT_MARGIN),
- delegate->GetLayoutDistance(
- LayoutDelegate::LayoutDistanceType::BUTTON_VEDGE_MARGIN_NEW),
- delegate->GetLayoutDistance(
- LayoutDelegate::LayoutDistanceType::BUTTON_HEDGE_MARGIN_NEW)));
- this->SetLayoutManager(layout);
const int column_view_set_id = 0;
views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id);
« no previous file with comments | « chrome/browser/chromeos/options/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698