| Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
|
| diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
|
| index a4dea10e1c835cc3c5a66687e314b51c520844aa..48e668f66aaba2e34124520bf95d27599368dcc8 100644
|
| --- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
|
| +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
|
| @@ -113,36 +113,14 @@ void AppInfoHeaderPanel::CreateControls() {
|
|
|
| void AppInfoHeaderPanel::LayoutAppNameAndVersionInto(views::View* parent_view) {
|
| views::View* view = new views::View();
|
| - // We need a horizontal BoxLayout here to ensure that the GridLayout does
|
| - // not stretch beyond the size of its content.
|
| - view->SetLayoutManager(
|
| - new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
|
| + views::BoxLayout* layout = new views::BoxLayout(
|
| + views::BoxLayout::kHorizontal, 0, 0, kSpacingBetweenAppTitleAndVersion);
|
| + view->SetLayoutManager(layout);
|
|
|
| - views::View* container_view = new views::View();
|
| - view->AddChildView(container_view);
|
| - views::GridLayout* layout = new views::GridLayout(container_view);
|
| - container_view->SetLayoutManager(layout);
|
| -
|
| - static const int kColumnId = 1;
|
| - views::ColumnSet* column_set = layout->AddColumnSet(kColumnId);
|
| - column_set->AddColumn(views::GridLayout::LEADING,
|
| - views::GridLayout::TRAILING,
|
| - 1, // Stretch the title to as wide as needed
|
| - views::GridLayout::USE_PREF,
|
| - 0,
|
| - 0);
|
| - column_set->AddPaddingColumn(0, kSpacingBetweenAppTitleAndVersion);
|
| - column_set->AddColumn(views::GridLayout::LEADING,
|
| - views::GridLayout::TRAILING,
|
| - 0, // Do not stretch the version
|
| - views::GridLayout::USE_PREF,
|
| - 0,
|
| - 0);
|
| -
|
| - layout->StartRow(1, kColumnId);
|
| - layout->AddView(app_name_label_);
|
| + layout->SetFlexForViewAt(0, 1);
|
| + view->AddChildView(app_name_label_);
|
| if (app_version_label_)
|
| - layout->AddView(app_version_label_);
|
| + view->AddChildView(app_version_label_);
|
|
|
| parent_view->AddChildView(view);
|
| }
|
|
|