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

Unified Diff: ash/system/user/user_view.cc

Issue 1037443003: views: Make the LogoutButton not visible instead of early out in Paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/user_view.cc
diff --git a/ash/system/user/user_view.cc b/ash/system/user/user_view.cc
index 6e4a7269865f7644fa18c6fed45489635672ad15..6ca3e9b71460e19ac67af7d9331cf4aeeb3810d0 100644
--- a/ash/system/user/user_view.cc
+++ b/ash/system/user/user_view.cc
@@ -89,18 +89,12 @@ class LogoutButton : public TrayPopupLabelButton {
const base::string16& text,
bool placeholder)
: TrayPopupLabelButton(listener, text), placeholder_(placeholder) {
- SetEnabled(!placeholder_);
+ SetVisible(!placeholder_);
}
~LogoutButton() override {}
private:
- void Paint(gfx::Canvas* canvas, const views::CullSet& cull_set) override {
- // Just skip paint if this button used as a placeholder.
- if (!placeholder_)
- TrayPopupLabelButton::Paint(canvas, cull_set);
- }
-
bool placeholder_;
DISALLOW_COPY_AND_ASSIGN(LogoutButton);
};
« 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