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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "chrome/browser/chromeos/ui/echo_dialog_listener.h" | 9 #include "chrome/browser/chromeos/ui/echo_dialog_listener.h" |
10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 gfx::Size EchoDialogView::GetPreferredSize() const { | 164 gfx::Size EchoDialogView::GetPreferredSize() const { |
165 gfx::Size size = | 165 gfx::Size size = |
166 gfx::Size(kDialogLabelPreferredWidth, | 166 gfx::Size(kDialogLabelPreferredWidth, |
167 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); | 167 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); |
168 gfx::Insets insets = GetInsets(); | 168 gfx::Insets insets = GetInsets(); |
169 size.Enlarge(insets.width(), insets.height()); | 169 size.Enlarge(insets.width(), insets.height()); |
170 return size; | 170 return size; |
171 } | 171 } |
172 | 172 |
173 void EchoDialogView::SetLabelBorderAndBounds() { | 173 void EchoDialogView::SetLabelBorderAndBounds() { |
174 label_->SetBorder(views::Border::CreateEmptyBorder(kDialogLabelTopInset, | 174 label_->SetBorder(views::CreateEmptyBorder( |
175 kDialogLabelLeftInset, | 175 kDialogLabelTopInset, kDialogLabelLeftInset, kDialogLabelBottomInset, |
176 kDialogLabelBottomInset, | 176 kDialogLabelRightInset)); |
177 kDialogLabelRightInset)); | |
178 | 177 |
179 label_->SetBounds(label_->x(), | 178 label_->SetBounds(label_->x(), |
180 label_->y(), | 179 label_->y(), |
181 kDialogLabelPreferredWidth, | 180 kDialogLabelPreferredWidth, |
182 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); | 181 label_->GetHeightForWidth(kDialogLabelPreferredWidth)); |
183 } | 182 } |
184 | 183 |
185 } // namespace chromeos | 184 } // namespace chromeos |
OLD | NEW |