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

Unified Diff: ash/system/tray/tray_views.cc

Issue 10079006: ash: Disable some entries in the network tray-popup instead of removing them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « ash/system/tray/tray_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_views.cc
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index c09b5747e94e97812a1cdf871b3b2cf25ebb0164..f5db4c3f337df883abd63e51a5d6972977d9d222 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -104,6 +104,7 @@ void HoverHighlightView::AddLabel(const string16& text,
5, kTrayPopupDetailsIconWidth + kIconPaddingLeft, 5, 0));
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label->SetFont(label->font().DeriveFont(0, style));
+ label->SetDisabledColor(SkColorSetARGB(127, 0, 0, 0));
AddChildView(label);
accessible_name_ = text;
@@ -135,6 +136,11 @@ void HoverHighlightView::GetAccessibleState(ui::AccessibleViewState* state) {
state->name = accessible_name_;
}
+void HoverHighlightView::OnEnabledChanged() {
+ for (int i = 0; i < child_count(); ++i)
+ child_at(i)->SetEnabled(enabled());
+}
+
void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) {
canvas->DrawColor(hover_ ? highlight_color_ : default_color_);
}
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698