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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 312233003: Add fade eliding for Views Labels; related cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine alignment check; minor additional cleanup. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/views/profiles/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/lifetime/application_lifetime.h" 10 #include "chrome/browser/lifetime/application_lifetime.h"
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 const int kDeleteButtonWidth = delete_default_image->width(); 1282 const int kDeleteButtonWidth = delete_default_image->width();
1283 const gfx::ImageSkia* warning_default_image = reauth_required ? 1283 const gfx::ImageSkia* warning_default_image = reauth_required ?
1284 rb->GetImageNamed(IDR_WARNING).ToImageSkia() : NULL; 1284 rb->GetImageNamed(IDR_WARNING).ToImageSkia() : NULL;
1285 const int kWarningButtonWidth = reauth_required ? 1285 const int kWarningButtonWidth = reauth_required ?
1286 warning_default_image->width() + views::kRelatedButtonHSpacing : 0; 1286 warning_default_image->width() + views::kRelatedButtonHSpacing : 0;
1287 int available_width = width - 1287 int available_width = width -
1288 kDeleteButtonWidth - kWarningButtonWidth - views::kButtonHEdgeMarginNew; 1288 kDeleteButtonWidth - kWarningButtonWidth - views::kButtonHEdgeMarginNew;
1289 1289
1290 views::LabelButton* email_button = new BackgroundColorHoverButton( 1290 views::LabelButton* email_button = new BackgroundColorHoverButton(
1291 NULL, 1291 NULL,
1292 gfx::ElideEmail(base::UTF8ToUTF16(account), 1292 gfx::ElideText(base::UTF8ToUTF16(account), gfx::FontList(),
1293 rb->GetFontList(ui::ResourceBundle::BaseFont), 1293 available_width, gfx::ELIDE_EMAIL),
1294 available_width),
1295 gfx::ImageSkia(), 1294 gfx::ImageSkia(),
1296 gfx::ImageSkia()); 1295 gfx::ImageSkia());
1297 layout->StartRow(1, 0); 1296 layout->StartRow(1, 0);
1298 layout->AddView(email_button); 1297 layout->AddView(email_button);
1299 1298
1300 // Delete button. 1299 // Delete button.
1301 views::ImageButton* delete_button = new views::ImageButton(this); 1300 views::ImageButton* delete_button = new views::ImageButton(this);
1302 delete_button->SetImageAlignment(views::ImageButton::ALIGN_RIGHT, 1301 delete_button->SetImageAlignment(views::ImageButton::ALIGN_RIGHT,
1303 views::ImageButton::ALIGN_MIDDLE); 1302 views::ImageButton::ALIGN_MIDDLE);
1304 delete_button->SetImage(views::ImageButton::STATE_NORMAL, 1303 delete_button->SetImage(views::ImageButton::STATE_NORMAL,
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 layout->StartRowWithPadding( 1474 layout->StartRowWithPadding(
1476 1, 0, 0, views::kUnrelatedControlVerticalSpacing); 1475 1, 0, 0, views::kUnrelatedControlVerticalSpacing);
1477 layout->AddView(end_preview_and_relaunch_button_); 1476 layout->AddView(end_preview_and_relaunch_button_);
1478 1477
1479 TitleCard* title_card = new TitleCard( 1478 TitleCard* title_card = new TitleCard(
1480 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); 1479 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_);
1481 return TitleCard::AddPaddedTitleCard( 1480 return TitleCard::AddPaddedTitleCard(
1482 view, title_card, kFixedAccountRemovalViewWidth); 1481 view, title_card, kFixedAccountRemovalViewWidth);
1483 } 1482 }
1484 1483
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/new_avatar_button.cc ('k') | chrome/browser/ui/views/screen_capture_notification_ui_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698