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

Side by Side Diff: chrome/browser/chromeos/options/vpn_config_view.cc

Issue 8221027: Make views::Label and views::Link auto-color themselves to be readable over their background colo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/vpn_config_view.h" 5 #include "chrome/browser/chromeos/options/vpn_config_view.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } else { 536 } else {
537 group_name_label_ = NULL; 537 group_name_label_ = NULL;
538 group_name_textfield_ = NULL; 538 group_name_textfield_ = NULL;
539 } 539 }
540 540
541 // Error label. 541 // Error label.
542 layout->StartRow(0, column_view_set_id); 542 layout->StartRow(0, column_view_set_id);
543 layout->SkipColumns(1); 543 layout->SkipColumns(1);
544 error_label_ = new views::Label(); 544 error_label_ = new views::Label();
545 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 545 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
546 error_label_->SetColor(SK_ColorRED); 546 error_label_->SetAutoColorReadabilityEnabled(false);
sky 2011/10/11 14:54:10 I tend to think you don't need this for the subcla
547 error_label_->SetEnabledColor(SK_ColorRED);
547 layout->AddView(error_label_); 548 layout->AddView(error_label_);
548 549
549 // Set or hide the UI, update comboboxes and error labels. 550 // Set or hide the UI, update comboboxes and error labels.
550 Refresh(); 551 Refresh();
551 } 552 }
552 553
553 void VPNConfigView::Refresh() { 554 void VPNConfigView::Refresh() {
554 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); 555 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
555 556
556 UpdateControls(); 557 UpdateControls();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 return std::string(); 708 return std::string();
708 std::string untrimmed = UTF16ToUTF8(textfield->text()); 709 std::string untrimmed = UTF16ToUTF8(textfield->text());
709 if (!trim_whitespace) 710 if (!trim_whitespace)
710 return untrimmed; 711 return untrimmed;
711 std::string result; 712 std::string result;
712 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); 713 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result);
713 return result; 714 return result;
714 } 715 }
715 716
716 } // namespace chromeos 717 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698