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

Side by Side Diff: chrome/browser/ui/views/sad_tab_view.cc

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: rebase for r476345 Created 3 years, 6 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 unified diff | Download patch
OLDNEW
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"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/app/vector_icons/vector_icons.h" 12 #include "chrome/app/vector_icons/vector_icons.h"
13 #include "chrome/browser/ui/views/harmony/chrome_typography.h"
13 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
14 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/gfx/color_palette.h" 17 #include "ui/gfx/color_palette.h"
17 #include "ui/gfx/paint_vector_icon.h" 18 #include "ui/gfx/paint_vector_icon.h"
18 #include "ui/native_theme/common_theme.h" 19 #include "ui/native_theme/common_theme.h"
19 #include "ui/native_theme/native_theme.h" 20 #include "ui/native_theme/native_theme.h"
20 #include "ui/views/background.h" 21 #include "ui/views/background.h"
21 #include "ui/views/controls/button/md_text_button.h" 22 #include "ui/views/controls/button/md_text_button.h"
22 #include "ui/views/controls/image_view.h" 23 #include "ui/views/controls/image_view.h"
23 #include "ui/views/controls/label.h" 24 #include "ui/views/controls/label.h"
24 #include "ui/views/controls/link.h" 25 #include "ui/views/controls/link.h"
25 #include "ui/views/layout/grid_layout.h" 26 #include "ui/views/layout/grid_layout.h"
26 #include "ui/views/layout/layout_constants.h" 27 #include "ui/views/layout/layout_constants.h"
27 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
28 29
29 namespace { 30 namespace {
30 31
31 constexpr int kMaxContentWidth = 600; 32 constexpr int kMaxContentWidth = 600;
32 constexpr int kMinColumnWidth = 120; 33 constexpr int kMinColumnWidth = 120;
33 constexpr int kTitleBottomSpacing = 13; 34 constexpr int kTitleBottomSpacing = 13;
34 constexpr int kBulletBottomSpacing = 1; 35 constexpr int kBulletBottomSpacing = 1;
35 constexpr int kBulletWidth = 20; 36 constexpr int kBulletWidth = 20;
36 constexpr int kBulletPadding = 13; 37 constexpr int kBulletPadding = 13;
37 38
38 views::Label* CreateFormattedLabel(const base::string16& message) { 39 views::Label* CreateFormattedLabel(const base::string16& message) {
39 views::Label* label = new views::Label(message); 40 views::Label* label =
41 new views::Label(message, views::style::CONTEXT_LABEL, STYLE_SECONDARY);
40 42
41 label->SetMultiLine(true); 43 label->SetMultiLine(true);
42 label->SetEnabled(false);
43 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 44 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
44 label->SetLineHeight(views::kPanelSubVerticalSpacing); 45 label->SetLineHeight(views::kPanelSubVerticalSpacing);
45 46
46 return label; 47 return label;
47 } 48 }
48 49
49 } // namespace 50 } // namespace
50 51
51 SadTabView::SadTabView(content::WebContents* web_contents, 52 SadTabView::SadTabView(content::WebContents* web_contents,
52 chrome::SadTabKind kind) 53 chrome::SadTabKind kind)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 193 }
193 194
194 namespace chrome { 195 namespace chrome {
195 196
196 SadTab* SadTab::Create(content::WebContents* web_contents, 197 SadTab* SadTab::Create(content::WebContents* web_contents,
197 SadTabKind kind) { 198 SadTabKind kind) {
198 return new SadTabView(web_contents, kind); 199 return new SadTabView(web_contents, kind);
199 } 200 }
200 201
201 } // namespace chrome 202 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698