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

Side by Side Diff: ash/display/display_error_dialog.cc

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month 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
« no previous file with comments | « no previous file | ash/launcher/launcher_tooltip_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/display/display_error_dialog.h" 5 #include "ash/display/display_error_dialog.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "grit/ash_strings.h" 9 #include "grit/ash_strings.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 widget->Show(); 56 widget->Show();
57 } 57 }
58 58
59 DisplayErrorDialog::DisplayErrorDialog() { 59 DisplayErrorDialog::DisplayErrorDialog() {
60 Shell::GetInstance()->display_controller()->AddObserver(this); 60 Shell::GetInstance()->display_controller()->AddObserver(this);
61 label_ = new views::Label( 61 label_ = new views::Label(
62 l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING)); 62 l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING));
63 AddChildView(label_); 63 AddChildView(label_);
64 64
65 label_->SetMultiLine(true); 65 label_->SetMultiLine(true);
66 label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 66 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
67 label_->set_border(views::Border::CreateEmptyBorder( 67 label_->set_border(views::Border::CreateEmptyBorder(
68 kDialogMessageMarginWidthPixel, 68 kDialogMessageMarginWidthPixel,
69 kDialogMessageMarginWidthPixel, 69 kDialogMessageMarginWidthPixel,
70 kDialogMessageMarginWidthPixel, 70 kDialogMessageMarginWidthPixel,
71 kDialogMessageMarginWidthPixel)); 71 kDialogMessageMarginWidthPixel));
72 label_->SizeToFit(kDialogMessageWidthPixel); 72 label_->SizeToFit(kDialogMessageWidthPixel);
73 } 73 }
74 74
75 DisplayErrorDialog::~DisplayErrorDialog() { 75 DisplayErrorDialog::~DisplayErrorDialog() {
76 Shell::GetInstance()->display_controller()->RemoveObserver(this); 76 Shell::GetInstance()->display_controller()->RemoveObserver(this);
(...skipping 15 matching lines...) Expand all
92 gfx::Size DisplayErrorDialog::GetPreferredSize() { 92 gfx::Size DisplayErrorDialog::GetPreferredSize() {
93 return label_->GetPreferredSize(); 93 return label_->GetPreferredSize();
94 } 94 }
95 95
96 void DisplayErrorDialog::OnDisplayConfigurationChanging() { 96 void DisplayErrorDialog::OnDisplayConfigurationChanging() {
97 GetWidget()->Close(); 97 GetWidget()->Close();
98 } 98 }
99 99
100 } // namespace internal 100 } // namespace internal
101 } // namespace ash 101 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698