Commit 55d9d4fe authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Speculative fix for incorrect tray stylus button background size

This fix makes sure the background for the stylus button
is explicitly updated any time it's visibility changes.

Bug: 1030268
Change-Id: I5141051f156258e1e68317f11fa69fb416db22fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2048764Reviewed-by: default avatarTim Song <tengs@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740407}
parent 62751ae7
......@@ -591,10 +591,13 @@ bool PaletteTray::HasSeenStylus() {
}
void PaletteTray::UpdateIconVisibility() {
SetVisiblePreferred(HasSeenStylus() && is_palette_enabled_ &&
stylus_utils::HasStylusInput() &&
ShouldShowOnDisplay(this) &&
palette_utils::IsInUserSession());
bool visible_preferred = HasSeenStylus() && is_palette_enabled_ &&
stylus_utils::HasStylusInput() &&
ShouldShowOnDisplay(this) &&
palette_utils::IsInUserSession();
SetVisiblePreferred(visible_preferred);
if (visible_preferred)
UpdateAfterShelfChange();
}
} // namespace ash
......@@ -354,6 +354,7 @@ void TrayBackgroundView::CloseBubble() {}
void TrayBackgroundView::ShowBubble(bool show_by_click) {}
void TrayBackgroundView::UpdateAfterShelfChange() {
UpdateBackground();
tray_container_->UpdateAfterShelfChange();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment