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

Unified Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 7635027: Change show/hide password button image. Changed to ToggleImageButton. Added tooltip to the button. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/options/wifi_config_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/options/wifi_config_view.cc
===================================================================
--- chrome/browser/chromeos/options/wifi_config_view.cc (revision 96582)
+++ chrome/browser/chromeos/options/wifi_config_view.cc (working copy)
@@ -494,8 +494,11 @@
void WifiConfigView::ButtonPressed(views::Button* sender,
const views::Event& event) {
if (sender == passphrase_visible_button_) {
- if (passphrase_textfield_)
+ if (passphrase_textfield_) {
passphrase_textfield_->SetPassword(!passphrase_textfield_->IsPassword());
+ passphrase_visible_button_->SetToggled(
+ !passphrase_textfield_->IsPassword());
+ }
} else {
NOTREACHED();
}
@@ -872,11 +875,25 @@
label_text_id));
layout->AddView(passphrase_textfield_);
// Password visible button.
- passphrase_visible_button_ = new views::ImageButton(this);
+ passphrase_visible_button_ = new views::ToggleImageButton(this);
+ passphrase_visible_button_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_SHOW)));
+ passphrase_visible_button_->SetToggledTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE_HIDE)));
passphrase_visible_button_->SetImage(
views::ImageButton::BS_NORMAL,
ResourceBundle::GetSharedInstance().
- GetBitmapNamed(IDR_STATUSBAR_NETWORK_SECURE));
+ GetBitmapNamed(IDR_NETWORK_SHOW_PASSWORD_OFF));
+ passphrase_visible_button_->SetImage(
+ views::ImageButton::BS_HOT,
+ ResourceBundle::GetSharedInstance().
+ GetBitmapNamed(IDR_NETWORK_SHOW_PASSWORD_HOVER));
+ passphrase_visible_button_->SetToggledImage(
+ views::ImageButton::BS_NORMAL,
+ ResourceBundle::GetSharedInstance().
+ GetBitmapNamed(IDR_NETWORK_SHOW_PASSWORD_ON));
passphrase_visible_button_->SetImageAlignment(
views::ImageButton::ALIGN_CENTER, views::ImageButton::ALIGN_MIDDLE);
layout->AddView(passphrase_visible_button_);
« no previous file with comments | « chrome/browser/chromeos/options/wifi_config_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698