| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/views/translate/translate_bubble_view.h" | 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 views::ColumnSet* cs = layout->AddColumnSet(COLUMN_SET_ID_MESSAGE); | 564 views::ColumnSet* cs = layout->AddColumnSet(COLUMN_SET_ID_MESSAGE); |
| 565 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 565 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
| 566 GridLayout::USE_PREF, 0, 0); | 566 GridLayout::USE_PREF, 0, 0); |
| 567 if (Use2016Q2UI()) { | 567 if (Use2016Q2UI()) { |
| 568 // Add padding between the icon and the text. | 568 // Add padding between the icon and the text. |
| 569 cs->AddPaddingColumn(0, views::kUnrelatedControlHorizontalSpacing); | 569 cs->AddPaddingColumn(0, views::kUnrelatedControlHorizontalSpacing); |
| 570 } else { | 570 } else { |
| 571 // Add padding between the text and the link. | 571 // Add padding between the text and the link. |
| 572 cs->AddPaddingColumn(0, views::kRelatedButtonHSpacing); | 572 cs->AddPaddingColumn(0, views::kRelatedButtonHSpacing); |
| 573 } | 573 } |
| 574 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 574 cs->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, |
| 575 GridLayout::USE_PREF, 0, 0); | 575 GridLayout::USE_PREF, 0, 0); |
| 576 cs->AddPaddingColumn(1, 0); | 576 cs->AddPaddingColumn(1, 0); |
| 577 | 577 |
| 578 cs = layout->AddColumnSet(COLUMN_SET_ID_CONTENT); | 578 cs = layout->AddColumnSet(COLUMN_SET_ID_CONTENT); |
| 579 cs->AddPaddingColumn(1, 0); | 579 cs->AddPaddingColumn(1, 0); |
| 580 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 580 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
| 581 GridLayout::USE_PREF, 0, 0); | 581 GridLayout::USE_PREF, 0, 0); |
| 582 cs->AddPaddingColumn(0, views::kRelatedButtonHSpacing); | 582 cs->AddPaddingColumn(0, views::kRelatedButtonHSpacing); |
| 583 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 583 cs->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
| 584 GridLayout::USE_PREF, 0, 0); | 584 GridLayout::USE_PREF, 0, 0); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 base::string16 label; | 964 base::string16 label; |
| 965 if (model_->IsPageTranslatedInCurrentLanguages()) | 965 if (model_->IsPageTranslatedInCurrentLanguages()) |
| 966 label = l10n_util::GetStringUTF16(IDS_DONE); | 966 label = l10n_util::GetStringUTF16(IDS_DONE); |
| 967 else | 967 else |
| 968 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); | 968 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); |
| 969 advanced_done_button_->SetText(label); | 969 advanced_done_button_->SetText(label); |
| 970 advanced_done_button_->SizeToPreferredSize(); | 970 advanced_done_button_->SizeToPreferredSize(); |
| 971 if (advanced_view_) | 971 if (advanced_view_) |
| 972 advanced_view_->Layout(); | 972 advanced_view_->Layout(); |
| 973 } | 973 } |
| OLD | NEW |