Commit 45296ca7 authored by Tatsuhisa Yamaguchi's avatar Tatsuhisa Yamaguchi Committed by Commit Bot

Set tooltip only when actually hovering on the battery view.

This is a follow-up of crrev.com/c/1306969. After that change it showed
the tooltip for power status even when hovering on other parts of the
tray.

Bug: 888072
Change-Id: I26c5786a8ff19347f2eb58dd1430e2d5ea66d066
Reviewed-on: https://chromium-review.googlesource.com/c/1308961Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604204}
parent 4e4c3c10
...@@ -58,7 +58,7 @@ void PowerTrayView::GetAccessibleNodeData(ui::AXNodeData* node_data) { ...@@ -58,7 +58,7 @@ void PowerTrayView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
} }
views::View* PowerTrayView::GetTooltipHandlerForPoint(const gfx::Point& point) { views::View* PowerTrayView::GetTooltipHandlerForPoint(const gfx::Point& point) {
return this; return GetLocalBounds().Contains(point) ? this : nullptr;
} }
bool PowerTrayView::GetTooltipText(const gfx::Point& p, bool PowerTrayView::GetTooltipText(const gfx::Point& p,
......
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