Index: chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc |
diff --git a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc b/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc |
index 409a007b13226e5211f2d2de5deaea073f9d4384..4a6bc4e0c4054e4a21ed66461d298e85146c81aa 100644 |
--- a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc |
+++ b/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc |
@@ -10,6 +10,7 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "base/threading/thread_task_runner_handle.h" |
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" |
#include "chrome/grit/generated_resources.h" |
#include "components/constrained_window/constrained_window_views.h" |
#include "content/public/browser/web_contents.h" |
@@ -18,7 +19,6 @@ |
#include "ui/gfx/range/range.h" |
#include "ui/views/controls/styled_label.h" |
#include "ui/views/layout/box_layout.h" |
-#include "ui/views/layout/layout_constants.h" |
namespace { |
@@ -132,11 +132,16 @@ RequestFileSystemDialogView::RequestFileSystemDialogView( |
placeholder_offsets[1] + volume_name.length()), |
bold_style); |
+ ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); |
+ const int button_margin = |
+ provider->GetDistanceMetric(DISTANCE_DIALOG_BUTTON_MARGIN); |
+ const int vertical_margin = |
+ provider->GetDistanceMetric(DISTANCE_PANEL_CONTENT_MARGIN); |
Peter Kasting
2017/04/17 19:36:18
This combination is basically INSETS_PANEL.
We co
ananta
2017/04/26 02:37:29
Changed to use FillLayout. To return the insets I
|
+ |
views::BoxLayout* const layout = new views::BoxLayout( |
- views::BoxLayout::kHorizontal, views::kButtonHEdgeMarginNew, |
- views::kPanelVertMargin, 0); |
+ views::BoxLayout::kHorizontal, button_margin, vertical_margin, 0); |
contents_view_->SetLayoutManager(layout); |
- label->SizeToFit(kDialogMaxWidth - 2 * views::kButtonHEdgeMarginNew); |
+ label->SizeToFit(kDialogMaxWidth - 2 * button_margin); |
contents_view_->AddChildView(label); |
} |