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

Side by Side Diff: ash/system/chromeos/audio/tray_audio.cc

Issue 140693017: Clean-up: Replaces obsolete Font/FontList methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 10 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 | « ash/ime/candidate_view.cc ('k') | ash/system/chromeos/network/tray_sms.cc » ('j') | 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) 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 "ash/system/chromeos/audio/tray_audio.h" 5 #include "ash/system/chromeos/audio/tray_audio.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 gfx::Font::NORMAL, 481 gfx::Font::NORMAL,
482 input_devices_[i].active); /* checkmark if active */ 482 input_devices_[i].active); /* checkmark if active */
483 device_map_[container] = input_devices_[i]; 483 device_map_[container] = input_devices_[i];
484 } 484 }
485 485
486 scroll_content()->SizeToPreferredSize(); 486 scroll_content()->SizeToPreferredSize();
487 scroller()->Layout(); 487 scroller()->Layout();
488 } 488 }
489 489
490 void AddScrollListInfoItem(const base::string16& text) { 490 void AddScrollListInfoItem(const base::string16& text) {
491 views::Label* label = new views::Label(text); 491 views::Label* label = new views::Label(
492 text,
493 ui::ResourceBundle::GetSharedInstance().GetFontList(
494 ui::ResourceBundle::BoldFont));
492 495
493 // Align info item with checkbox items 496 // Align info item with checkbox items
494 int margin = kTrayPopupPaddingHorizontal + 497 int margin = kTrayPopupPaddingHorizontal +
495 kTrayPopupDetailsLabelExtraLeftMargin; 498 kTrayPopupDetailsLabelExtraLeftMargin;
496 int left_margin = 0; 499 int left_margin = 0;
497 int right_margin = 0; 500 int right_margin = 0;
498 if (base::i18n::IsRTL()) 501 if (base::i18n::IsRTL())
499 right_margin = margin; 502 right_margin = margin;
500 else 503 else
501 left_margin = margin; 504 left_margin = margin;
502 505
503 label->SetBorder( 506 label->SetBorder(
504 views::Border::CreateEmptyBorder(ash::kTrayPopupPaddingBetweenItems, 507 views::Border::CreateEmptyBorder(ash::kTrayPopupPaddingBetweenItems,
505 left_margin, 508 left_margin,
506 ash::kTrayPopupPaddingBetweenItems, 509 ash::kTrayPopupPaddingBetweenItems,
507 right_margin)); 510 right_margin));
508 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 511 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
509 label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0)); 512 label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0));
510 label->SetFontList(label->font_list().DeriveFontListWithSizeDeltaAndStyle(
511 0, gfx::Font::BOLD));
512 513
513 scroll_content()->AddChildView(label); 514 scroll_content()->AddChildView(label);
514 } 515 }
515 516
516 HoverHighlightView* AddScrollListItem(const base::string16& text, 517 HoverHighlightView* AddScrollListItem(const base::string16& text,
517 gfx::Font::FontStyle style, 518 gfx::Font::FontStyle style,
518 bool checked) { 519 bool checked) {
519 HoverHighlightView* container = new HoverHighlightView(this); 520 HoverHighlightView* container = new HoverHighlightView(this);
520 container->AddCheckableLabel(text, style, checked); 521 container->AddCheckableLabel(text, style, checked);
521 scroll_content()->AddChildView(container); 522 scroll_content()->AddChildView(container);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 if (audio_detail_) 654 if (audio_detail_)
654 audio_detail_->Update(); 655 audio_detail_->Update();
655 if (volume_view_) { 656 if (volume_view_) {
656 volume_view_->SetVolumeLevel(GetVolumeLevel()); 657 volume_view_->SetVolumeLevel(GetVolumeLevel());
657 volume_view_->Update(); 658 volume_view_->Update();
658 } 659 }
659 } 660 }
660 661
661 } // namespace internal 662 } // namespace internal
662 } // namespace ash 663 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ime/candidate_view.cc ('k') | ash/system/chromeos/network/tray_sms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698