| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/ui/echo_dialog_view.h" | 5 #include "chrome/browser/chromeos/ui/echo_dialog_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/ui/echo_dialog_listener.h" | 7 #include "chrome/browser/chromeos/ui/echo_dialog_listener.h" |
| 8 #include "grit/generated_resources.h" | 8 #include "grit/generated_resources.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 gfx::Size EchoDialogView::GetPreferredSize() { | 161 gfx::Size EchoDialogView::GetPreferredSize() { |
| 162 gfx::Size size = | 162 gfx::Size size = |
| 163 gfx::Size(kDialogLabelPreferredWidth, | 163 gfx::Size(kDialogLabelPreferredWidth, |
| 164 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); | 164 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); |
| 165 gfx::Insets insets = GetInsets(); | 165 gfx::Insets insets = GetInsets(); |
| 166 size.Enlarge(insets.width(), insets.height()); | 166 size.Enlarge(insets.width(), insets.height()); |
| 167 return size; | 167 return size; |
| 168 } | 168 } |
| 169 | 169 |
| 170 void EchoDialogView::SetLabelBorderAndBounds() { | 170 void EchoDialogView::SetLabelBorderAndBounds() { |
| 171 label_->set_border(views::Border::CreateEmptyBorder( | 171 label_->SetBorder(views::Border::CreateEmptyBorder(kDialogLabelTopInset, |
| 172 kDialogLabelTopInset, | 172 kDialogLabelLeftInset, |
| 173 kDialogLabelLeftInset, | 173 kDialogLabelBottomInset, |
| 174 kDialogLabelBottomInset, | 174 kDialogLabelRightInset)); |
| 175 kDialogLabelRightInset)); | |
| 176 | 175 |
| 177 label_->SetBounds(label_->x(), | 176 label_->SetBounds(label_->x(), |
| 178 label_->y(), | 177 label_->y(), |
| 179 kDialogLabelPreferredWidth, | 178 kDialogLabelPreferredWidth, |
| 180 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); | 179 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); |
| 181 } | 180 } |
| 182 | 181 |
| 183 } // namespace chromeos | 182 } // namespace chromeos |
| OLD | NEW |