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

Side by Side Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.cc

Issue 383953002: Moved the version number in App Info Dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused subtitle colour Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/apps/app_info_dialog/app_info_panel.h" 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h"
6 6
7 #include "ui/base/resource/resource_bundle.h" 7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/views/controls/label.h" 8 #include "ui/views/controls/label.h"
9 #include "ui/views/layout/box_layout.h" 9 #include "ui/views/layout/box_layout.h"
10 #include "ui/views/layout/layout_constants.h" 10 #include "ui/views/layout/layout_constants.h"
11 11
12 AppInfoPanel::AppInfoPanel(Profile* profile, const extensions::Extension* app) 12 AppInfoPanel::AppInfoPanel(Profile* profile, const extensions::Extension* app)
13 : profile_(profile), app_(app) { 13 : profile_(profile), app_(app) {
14 } 14 }
15 15
16 AppInfoPanel::~AppInfoPanel() { 16 AppInfoPanel::~AppInfoPanel() {
17 } 17 }
18 18
19 views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const { 19 views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const {
20 views::Label* label = new views::Label(text); 20 views::Label* label = new views::Label(text);
21 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 21 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
22 label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList( 22 label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
23 ui::ResourceBundle::MediumFont)); 23 ui::ResourceBundle::MediumFont));
24 return label; 24 return label;
25 } 25 }
26 26
27 views::View* AppInfoPanel::CreateVerticalStack() const { 27 views::Label* AppInfoPanel::CreateLeftAlignedLabel(
28 const base::string16& text) const {
29 views::Label* label = new views::Label(text);
30 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
31 return label;
32 }
33
34 views::View* AppInfoPanel::CreateVerticalStack(int child_spacing) const {
28 views::View* vertically_stacked_view = new views::View(); 35 views::View* vertically_stacked_view = new views::View();
29 vertically_stacked_view->SetLayoutManager( 36 vertically_stacked_view->SetLayoutManager(
30 new views::BoxLayout(views::BoxLayout::kVertical, 37 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, child_spacing));
31 0,
32 0,
33 views::kRelatedControlVerticalSpacing));
34 return vertically_stacked_view; 38 return vertically_stacked_view;
35 } 39 }
40
41 views::View* AppInfoPanel::CreateVerticalStack() const {
42 return CreateVerticalStack(views::kRelatedControlVerticalSpacing);
43 }
44
45 views::View* AppInfoPanel::CreateHorizontalStack(int child_spacing) const {
46 views::View* vertically_stacked_view = new views::View();
47 vertically_stacked_view->SetLayoutManager(
48 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, child_spacing));
49 return vertically_stacked_view;
50 }
51
52 views::View* AppInfoPanel::CreateHorizontalStack() const {
53 return CreateVerticalStack(views::kRelatedControlHorizontalSpacing);
54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698