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

Side by Side Diff: ui/views/controls/message_box_view.cc

Issue 11077006: Correct padding and focus ring for frameless constrained window dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add comments and ASCII art. More clear implementation of client insets. Created 8 years, 2 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
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 "ui/views/controls/message_box_view.h" 5 #include "ui/views/controls/message_box_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (checkbox_) { 243 if (checkbox_) {
244 column_set = layout->AddColumnSet(checkbox_column_view_set_id); 244 column_set = layout->AddColumnSet(checkbox_column_view_set_id);
245 if (icon_) { 245 if (icon_) {
246 column_set->AddPaddingColumn( 246 column_set->AddPaddingColumn(
247 0, icon_size.width() + kUnrelatedControlHorizontalSpacing); 247 0, icon_size.width() + kUnrelatedControlHorizontalSpacing);
248 } 248 }
249 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, 249 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
250 GridLayout::USE_PREF, 0, 0); 250 GridLayout::USE_PREF, 0, 0);
251 } 251 }
252 252
253 // Account for message font descent.
254 int descent = 0;
255
253 for (size_t i = 0; i < message_labels_.size(); ++i) { 256 for (size_t i = 0; i < message_labels_.size(); ++i) {
254 layout->StartRow(i, message_column_view_set_id); 257 layout->StartRow(i, message_column_view_set_id);
255 if (icon_) { 258 if (icon_) {
256 if (i == 0) 259 if (i == 0)
257 layout->AddView(icon_); 260 layout->AddView(icon_);
258 else 261 else
259 layout->SkipColumns(1); 262 layout->SkipColumns(1);
260 } 263 }
261 layout->AddView(message_labels_[i]); 264 layout->AddView(message_labels_[i]);
265 descent = 3;
262 } 266 }
263 267
264 if (prompt_field_) { 268 if (prompt_field_) {
265 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 269 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
266 layout->StartRow(0, textfield_column_view_set_id); 270 layout->StartRow(0, textfield_column_view_set_id);
267 layout->AddView(prompt_field_); 271 layout->AddView(prompt_field_);
272 descent = 3;
268 } 273 }
269 274
270 if (checkbox_) { 275 if (checkbox_) {
271 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 276 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
272 layout->StartRow(0, checkbox_column_view_set_id); 277 layout->StartRow(0, checkbox_column_view_set_id);
273 layout->AddView(checkbox_); 278 layout->AddView(checkbox_);
279 descent = 3;
274 } 280 }
275 281
276 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 282 layout->AddPaddingRow(0, inter_row_vertical_spacing_ - descent);
Mike Wittman 2012/10/09 22:55:46 This should be behind the flag. Also, is this cla
please use gerrit instead 2012/10/10 19:12:58 The word from UX (kenmoore@) is to adjust the regu
277 } 283 }
278 284
279 } // namespace views 285 } // namespace views
OLDNEW
« ui/views/controls/button/chrome_style.cc ('K') | « ui/views/controls/button/chrome_style.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698