Commit 90f0b74f authored by Tatsuhisa Yamaguchi's avatar Tatsuhisa Yamaguchi Committed by Commit Bot

Unified: Set tooltip for Notifications count or dnd icon.

This change updates tooltip for the latest design spec.
The tooltips describe either the number of notifications or being in
DnD mode, so that these should work well for a11y label as well.

Bug: 888072
Change-Id: Ifed382eca722c6948cf14a9f834ad0bb314c1629
Reviewed-on: https://chromium-review.googlesource.com/c/1306935Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603784}
parent 2010bba4
......@@ -276,6 +276,14 @@ This file contains the strings for ash.
<message name="IDS_ASH_STATUS_TRAY_CAST_STOP" desc="The label used in the tray popup to stop casting.">
Stop
</message>
<message name="IDS_ASH_STATUS_TRAY_QUIET_MODE_TOOLTIP" desc="The tooltip text for the status area icon to tell do-not-disturb mode is currently on.">
Do Not Disturb is on
</message>
<message name="IDS_ASH_STATUS_TRAY_NOTIFICATIONS_COUNT_TOOLTIP" desc="The tooltip text for a status area icon to describe number of notifications. [ICU Syntax]">
{NUM_NOTIFICATIONS, plural,
=1 {1 notification}
other {# notifications}}
</message>
<message name="IDS_ASH_STATUS_TRAY_BLUETOOTH" desc="The label used as the header in the bluetooth popup.">
Bluetooth
......
......@@ -92,8 +92,6 @@ class NumberIconImageSource : public gfx::CanvasImageSource {
NotificationCounterView::NotificationCounterView(Shelf* shelf)
: TrayItemView(shelf) {
CreateImageView();
image_view()->set_tooltip_text(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NOTIFICATIONS_LABEL));
SetVisible(false);
Shell::Get()->session_controller()->AddObserver(this);
}
......@@ -116,6 +114,8 @@ void NotificationCounterView::Update() {
gfx::CanvasImageSource::MakeImageSkia<NumberIconImageSource>(icon_id));
count_for_display_ = icon_id;
}
image_view()->set_tooltip_text(l10n_util::GetPluralStringFUTF16(
IDS_ASH_STATUS_TRAY_NOTIFICATIONS_COUNT_TOOLTIP, notification_count));
SetVisible(true);
}
......@@ -126,6 +126,8 @@ void NotificationCounterView::OnSessionStateChanged(
QuietModeView::QuietModeView(Shelf* shelf) : TrayItemView(shelf) {
CreateImageView();
image_view()->set_tooltip_text(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_QUIET_MODE_TOOLTIP));
SetVisible(false);
Shell::Get()->session_controller()->AddObserver(this);
}
......
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