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

Unified Diff: chrome/browser/ui/views/harmony/harmony_layout_delegate.cc

Issue 2702403010: Fix the absence of padding on some UI buttons. (Closed)
Patch Set: Created 3 years, 10 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/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/harmony/layout_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/harmony/harmony_layout_delegate.cc
diff --git a/chrome/browser/ui/views/harmony/harmony_layout_delegate.cc b/chrome/browser/ui/views/harmony/harmony_layout_delegate.cc
index 45cb24b059f216a32cfa5b124dbefd104427b4c7..e61ff55c2dd57dd6d22cc842a716cca3204a5ef9 100644
--- a/chrome/browser/ui/views/harmony/harmony_layout_delegate.cc
+++ b/chrome/browser/ui/views/harmony/harmony_layout_delegate.cc
@@ -19,12 +19,14 @@ int HarmonyLayoutDelegate::GetMetric(Metric metric) const {
switch (metric) {
case Metric::BUTTON_HORIZONTAL_PADDING:
return kHarmonyLayoutUnit;
- case Metric::DIALOG_BUTTON_MARGIN:
- return kHarmonyLayoutUnit;
- case Metric::DIALOG_BUTTON_MINIMUM_WIDTH:
+ case Metric::BUTTON_MINIMUM_WIDTH:
// Minimum label size plus padding.
return 2 * kHarmonyLayoutUnit +
2 * GetMetric(Metric::BUTTON_HORIZONTAL_PADDING);
+ case Metric::DIALOG_BUTTON_MARGIN:
+ return kHarmonyLayoutUnit;
+ case Metric::DIALOG_BUTTON_MINIMUM_WIDTH:
+ return GetMetric(Metric::BUTTON_MINIMUM_WIDTH);
Peter Kasting 2017/02/24 02:00:50 Nit: Honestly I'd find it a bit clearer to do c
Bret 2017/02/24 02:29:45 Done, just for BUTTON_MINIMUM_WIDTH. I'll let Alle
case Metric::DIALOG_BUTTON_TOP_SPACING:
return kHarmonyLayoutUnit;
case Metric::DIALOG_CLOSE_BUTTON_MARGIN:
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/harmony/layout_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698