Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sad_tab_view.h" | 5 #include "chrome/browser/ui/views/sad_tab_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 constexpr int kMaxContentWidth = 600; | 31 constexpr int kMaxContentWidth = 600; |
| 32 constexpr int kMinColumnWidth = 120; | 32 constexpr int kMinColumnWidth = 120; |
| 33 constexpr int kTitleBottomSpacing = 13; | 33 constexpr int kTitleBottomSpacing = 13; |
| 34 constexpr int kBulletBottomSpacing = 1; | 34 constexpr int kBulletBottomSpacing = 1; |
| 35 constexpr int kBulletWidth = 20; | 35 constexpr int kBulletWidth = 20; |
| 36 constexpr int kBulletPadding = 13; | 36 constexpr int kBulletPadding = 13; |
| 37 | 37 |
| 38 views::Label* CreateFormattedLabel(const base::string16& message) { | 38 views::Label* CreateFormattedLabel(const base::string16& message) { |
| 39 views::Label* label = new views::Label(message); | 39 views::Label* label = new views::Label(message, views::style::CONTEXT_LABEL, |
| 40 views::style::STYLE_DISABLED); | |
|
Peter Kasting
2017/06/01 04:55:58
It doesn't seem like the context of this should be
tapted
2017/06/01 11:22:18
Done.
| |
| 40 | 41 |
| 41 label->SetMultiLine(true); | 42 label->SetMultiLine(true); |
| 42 label->SetEnabled(false); | |
| 43 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 43 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 44 label->SetLineHeight(views::kPanelSubVerticalSpacing); | 44 label->SetLineHeight(views::kPanelSubVerticalSpacing); |
| 45 | 45 |
| 46 return label; | 46 return label; |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace | 49 } // namespace |
| 50 | 50 |
| 51 SadTabView::SadTabView(content::WebContents* web_contents, | 51 SadTabView::SadTabView(content::WebContents* web_contents, |
| 52 chrome::SadTabKind kind) | 52 chrome::SadTabKind kind) |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 } | 192 } |
| 193 | 193 |
| 194 namespace chrome { | 194 namespace chrome { |
| 195 | 195 |
| 196 SadTab* SadTab::Create(content::WebContents* web_contents, | 196 SadTab* SadTab::Create(content::WebContents* web_contents, |
| 197 SadTabKind kind) { | 197 SadTabKind kind) { |
| 198 return new SadTabView(web_contents, kind); | 198 return new SadTabView(web_contents, kind); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace chrome | 201 } // namespace chrome |
| OLD | NEW |