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

Side by Side Diff: mash/catalog_viewer/catalog_viewer.cc

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: edits 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mash/catalog_viewer/catalog_viewer.h" 5 #include "mash/catalog_viewer/catalog_viewer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 29 matching lines...) Expand all
40 public views::TextfieldController { 40 public views::TextfieldController {
41 public: 41 public:
42 CatalogViewerContents(CatalogViewer* catalog_viewer, 42 CatalogViewerContents(CatalogViewer* catalog_viewer,
43 catalog::mojom::CatalogPtr catalog) 43 catalog::mojom::CatalogPtr catalog)
44 : catalog_viewer_(catalog_viewer), 44 : catalog_viewer_(catalog_viewer),
45 catalog_(std::move(catalog)), 45 catalog_(std::move(catalog)),
46 table_view_(nullptr), 46 table_view_(nullptr),
47 table_view_parent_(nullptr), 47 table_view_parent_(nullptr),
48 observer_(nullptr), 48 observer_(nullptr),
49 capability_(new views::Textfield) { 49 capability_(new views::Textfield) {
50 const int kPadding = 5; 50 constexpr int kPadding = 5;
51 SetBorder(views::CreateEmptyBorder(gfx::Insets(kPadding)));
51 set_background(views::Background::CreateStandardPanelBackground()); 52 set_background(views::Background::CreateStandardPanelBackground());
52 53
53 views::GridLayout* layout = new views::GridLayout(this); 54 views::GridLayout* layout = new views::GridLayout(this);
54 layout->SetInsets(kPadding, kPadding, kPadding, kPadding);
55 SetLayoutManager(layout); 55 SetLayoutManager(layout);
56 56
57 views::ColumnSet* columns = layout->AddColumnSet(0); 57 views::ColumnSet* columns = layout->AddColumnSet(0);
58 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0, 58 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0,
59 views::GridLayout::USE_PREF, 0, 0); 59 views::GridLayout::USE_PREF, 0, 0);
60 columns->AddPaddingColumn(0, kPadding); 60 columns->AddPaddingColumn(0, kPadding);
61 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 61 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
62 views::GridLayout::USE_PREF, 0, 0); 62 views::GridLayout::USE_PREF, 0, 0);
63 63
64 layout->StartRow(0, 0); 64 layout->StartRow(0, 0);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 windows_.push_back(window); 250 windows_.push_back(window);
251 } 251 }
252 252
253 void CatalogViewer::Create(const service_manager::BindSourceInfo& source_info, 253 void CatalogViewer::Create(const service_manager::BindSourceInfo& source_info,
254 mojom::LaunchableRequest request) { 254 mojom::LaunchableRequest request) {
255 bindings_.AddBinding(this, std::move(request)); 255 bindings_.AddBinding(this, std::move(request));
256 } 256 }
257 257
258 } // namespace catalog_viewer 258 } // namespace catalog_viewer
259 } // namespace mash 259 } // namespace mash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698