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

Side by Side Diff: chrome/browser/chromeos/login/user_image_view.cc

Issue 5173001: Changed the label for image screen according to mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better support for multi-line title Created 10 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 | « chrome/app/generated_resources.grd ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/login/user_image_view.h" 5 #include "chrome/browser/chromeos/login/user_image_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 throbber_->SetBounds(throbber_x, 123 throbber_->SetBounds(throbber_x,
124 throbber_y, 124 throbber_y,
125 throbber_size.width(), 125 throbber_size.width(),
126 throbber_size.height()); 126 throbber_size.height());
127 } 127 }
128 if (message_->IsVisible()) { 128 if (message_->IsVisible()) {
129 message_->SizeToFit(size.width() - kHorizontalMargin * 2); 129 message_->SizeToFit(size.width() - kHorizontalMargin * 2);
130 gfx::Size message_size = message_->GetPreferredSize(); 130 gfx::Size message_size = message_->GetPreferredSize();
131 int message_y = size.height() - kVerticalMargin - message_size.height(); 131 int message_y = size.height() - kVerticalMargin - message_size.height();
132 message_->SetBounds(kHorizontalMargin, 132 message_->SetBounds(kHorizontalMargin,
133 message_y, 133 message_y,
134 message_size.width(), 134 message_size.width(),
135 message_size.height()); 135 message_size.height());
136 } 136 }
137 } 137 }
138 138
139 // Throbber centered within the view. 139 // Throbber centered within the view.
140 views::Throbber* throbber_; 140 views::Throbber* throbber_;
141 141
142 // Message, multiline, aligned to the bottom of the view. 142 // Message, multiline, aligned to the bottom of the view.
143 views::Label* message_; 143 views::Label* message_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(CameraImageView); 145 DISALLOW_COPY_AND_ASSIGN(CameraImageView);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 views::GridLayout::USE_PREF, 0, 0); 234 views::GridLayout::USE_PREF, 0, 0);
235 column_set->AddPaddingColumn(0, kHorizontalPadding); 235 column_set->AddPaddingColumn(0, kHorizontalPadding);
236 column_set->AddColumn(views::GridLayout::TRAILING, 236 column_set->AddColumn(views::GridLayout::TRAILING,
237 views::GridLayout::TRAILING, 237 views::GridLayout::TRAILING,
238 0, 238 0,
239 views::GridLayout::USE_PREF, 0, 0); 239 views::GridLayout::USE_PREF, 0, 0);
240 column_set->AddPaddingColumn(0, kHorizontalMargin); 240 column_set->AddPaddingColumn(0, kHorizontalMargin);
241 241
242 // Fill the layout with rows and views now. 242 // Fill the layout with rows and views now.
243 layout->StartRowWithPadding(0, kTitleRow, 0, kVerticalMargin); 243 layout->StartRowWithPadding(0, kTitleRow, 0, kVerticalMargin);
244 layout->AddView(title_label_); 244 layout->AddView(title_label_,
245 1,
246 1,
247 views::GridLayout::FILL, // For multi-line support.
248 views::GridLayout::LEADING);
245 layout->StartRowWithPadding(0, kImageRow, 0, kVerticalPadding); 249 layout->StartRowWithPadding(0, kImageRow, 0, kVerticalPadding);
246 layout->AddView(user_image_); 250 layout->AddView(user_image_);
247 layout->StartRowWithPadding(1, kImageRow, 0, kVerticalPadding); 251 layout->StartRowWithPadding(1, kImageRow, 0, kVerticalPadding);
248 layout->AddView(snapshot_button_); 252 layout->AddView(snapshot_button_);
249 layout->StartRowWithPadding(0, kButtonsRow, 0, kVerticalPadding); 253 layout->StartRowWithPadding(0, kButtonsRow, 0, kVerticalPadding);
250 layout->AddView(skip_button_); 254 layout->AddView(skip_button_);
251 layout->AddView(ok_button_); 255 layout->AddView(ok_button_);
252 layout->AddPaddingRow(0, kVerticalMargin); 256 layout->AddPaddingRow(0, kVerticalMargin);
253 } 257 }
254 258
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 delegate_->OnOK(user_image_->GetImage()); 324 delegate_->OnOK(user_image_->GetImage());
321 } else if (sender == skip_button_) { 325 } else if (sender == skip_button_) {
322 delegate_->OnSkip(); 326 delegate_->OnSkip();
323 } else { 327 } else {
324 NOTREACHED(); 328 NOTREACHED();
325 } 329 }
326 } 330 }
327 331
328 } // namespace chromeos 332 } // namespace chromeos
329 333
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698