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

Unified Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2532083008: Make sure stylus tools are always hidden if disabled by the user. (Closed)
Patch Set: Created 4 years 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/common/system/chromeos/palette/palette_tray.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/palette/palette_tray.cc
diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc
index 036f4b65c9d030eb9c09604ee4300cab985c9309..2cfc5b8af776a8d412eed64d2739ccf4990423d4 100644
--- a/ash/common/system/chromeos/palette/palette_tray.cc
+++ b/ash/common/system/chromeos/palette/palette_tray.cc
@@ -456,6 +456,8 @@ void PaletteTray::OnStylusStateChanged(ui::StylusState stylus_state) {
}
void PaletteTray::OnPaletteEnabledPrefChanged(bool enabled) {
+ is_palette_enabled_ = enabled;
+
if (!enabled) {
SetVisible(false);
palette_tool_manager_->DisableActiveTool(PaletteGroup::MODE);
@@ -465,7 +467,7 @@ void PaletteTray::OnPaletteEnabledPrefChanged(bool enabled) {
}
void PaletteTray::UpdateIconVisibility() {
- SetVisible(IsInUserSession());
+ SetVisible(is_palette_enabled_ && IsInUserSession());
}
} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/palette/palette_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698