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

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

Issue 294783003: don't show border on hover for guest label in profile chooser view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dont delete that Created 6 years, 7 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
« no previous file with comments | « no previous file | 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 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const base::string16& text, 218 const base::string16& text,
219 bool is_editing_allowed) 219 bool is_editing_allowed)
220 : views::LabelButton(this, text), 220 : views::LabelButton(this, text),
221 profile_name_textfield_(NULL) { 221 profile_name_textfield_(NULL) {
222 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 222 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
223 const gfx::FontList& medium_font_list = 223 const gfx::FontList& medium_font_list =
224 rb->GetFontList(ui::ResourceBundle::MediumFont); 224 rb->GetFontList(ui::ResourceBundle::MediumFont);
225 SetFontList(medium_font_list); 225 SetFontList(medium_font_list);
226 SetHorizontalAlignment(gfx::ALIGN_CENTER); 226 SetHorizontalAlignment(gfx::ALIGN_CENTER);
227 227
228 if (!is_editing_allowed) 228 if (!is_editing_allowed) {
229 SetBorder(views::Border::CreateEmptyBorder(2, 0, 2, 0));
229 return; 230 return;
231 }
230 232
231 // Show an "edit" pencil icon when hovering over. In the default state, 233 // Show an "edit" pencil icon when hovering over. In the default state,
232 // we need to create an empty placeholder of the correct size, so that 234 // we need to create an empty placeholder of the correct size, so that
233 // the text doesn't jump around when the hovered icon appears. 235 // the text doesn't jump around when the hovered icon appears.
234 gfx::ImageSkia hover_image = 236 gfx::ImageSkia hover_image =
235 *rb->GetImageSkiaNamed(IDR_ICON_PROFILES_EDIT_HOVER); 237 *rb->GetImageSkiaNamed(IDR_ICON_PROFILES_EDIT_HOVER);
236 SetImage(STATE_NORMAL, CreateSquarePlaceholderImage(hover_image.width())); 238 SetImage(STATE_NORMAL, CreateSquarePlaceholderImage(hover_image.width()));
237 SetImage(STATE_HOVERED, hover_image); 239 SetImage(STATE_HOVERED, hover_image);
238 SetImage(STATE_PRESSED, 240 SetImage(STATE_PRESSED,
239 *rb->GetImageSkiaNamed(IDR_ICON_PROFILES_EDIT_PRESSED)); 241 *rb->GetImageSkiaNamed(IDR_ICON_PROFILES_EDIT_PRESSED));
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 layout->StartRowWithPadding( 1306 layout->StartRowWithPadding(
1305 1, 0, 0, views::kUnrelatedControlVerticalSpacing); 1307 1, 0, 0, views::kUnrelatedControlVerticalSpacing);
1306 layout->AddView(end_preview_and_relaunch_button_); 1308 layout->AddView(end_preview_and_relaunch_button_);
1307 1309
1308 TitleCard* title_card = new TitleCard( 1310 TitleCard* title_card = new TitleCard(
1309 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); 1311 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_);
1310 return TitleCard::AddPaddedTitleCard( 1312 return TitleCard::AddPaddedTitleCard(
1311 view, title_card, kFixedAccountRemovalViewWidth); 1313 view, title_card, kFixedAccountRemovalViewWidth);
1312 } 1314 }
1313 1315
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698