Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/browser/ui/views/harmony/harmony_layout_delegate.h" | 5 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 static base::LazyInstance<HarmonyLayoutDelegate> harmony_layout_delegate_ = | 10 static base::LazyInstance<HarmonyLayoutDelegate> harmony_layout_delegate_ = |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 case LayoutDistanceType::UNRELATED_CONTROL_VERTICAL_SPACING: | 30 case LayoutDistanceType::UNRELATED_CONTROL_VERTICAL_SPACING: |
| 31 return kHarmonyLayoutUnit; | 31 return kHarmonyLayoutUnit; |
| 32 case LayoutDistanceType::UNRELATED_CONTROL_LARGE_VERTICAL_SPACING: | 32 case LayoutDistanceType::UNRELATED_CONTROL_LARGE_VERTICAL_SPACING: |
| 33 return kHarmonyLayoutUnit; | 33 return kHarmonyLayoutUnit; |
| 34 case LayoutDistanceType::BUTTON_VEDGE_MARGIN_NEW: | 34 case LayoutDistanceType::BUTTON_VEDGE_MARGIN_NEW: |
| 35 return kHarmonyLayoutUnit; | 35 return kHarmonyLayoutUnit; |
| 36 case LayoutDistanceType::BUTTON_HEDGE_MARGIN_NEW: | 36 case LayoutDistanceType::BUTTON_HEDGE_MARGIN_NEW: |
| 37 return kHarmonyLayoutUnit; | 37 return kHarmonyLayoutUnit; |
| 38 case LayoutDistanceType::CHECKBOX_INDENT: | 38 case LayoutDistanceType::CHECKBOX_INDENT: |
| 39 return 0; | 39 return 0; |
| 40 case LayoutDistanceType::ITEM_LABEL_SPACING: | |
| 41 return kHarmonyLayoutUnit / 2; | |
|
Peter Kasting
2017/01/26 21:54:29
Shouldn't this be 16 px and not 8?
I'm looking at
Elly Fong-Jones
2017/01/30 19:47:34
Oh, yes, you are correct - this ought to have been
| |
| 40 } | 42 } |
| 41 NOTREACHED(); | 43 NOTREACHED(); |
| 42 return 0; | 44 return 0; |
| 43 } | 45 } |
| 44 | 46 |
| 45 views::GridLayout::Alignment | 47 views::GridLayout::Alignment |
| 46 HarmonyLayoutDelegate::GetControlLabelGridAlignment() const { | 48 HarmonyLayoutDelegate::GetControlLabelGridAlignment() const { |
| 47 return views::GridLayout::LEADING; | 49 return views::GridLayout::LEADING; |
| 48 } | 50 } |
| 49 | 51 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 60 case DialogWidthType::SMALL: | 62 case DialogWidthType::SMALL: |
| 61 return 320; | 63 return 320; |
| 62 case DialogWidthType::MEDIUM: | 64 case DialogWidthType::MEDIUM: |
| 63 return 448; | 65 return 448; |
| 64 case DialogWidthType::LARGE: | 66 case DialogWidthType::LARGE: |
| 65 return 512; | 67 return 512; |
| 66 } | 68 } |
| 67 NOTREACHED(); | 69 NOTREACHED(); |
| 68 return 0; | 70 return 0; |
| 69 } | 71 } |
| OLD | NEW |