0

gd: Disabled Feature Tooltip

This CL updates the tooltip on the Screen Size row of the Game
Dashboard.

Bug: b:331837110
Test: Verified change on DUT
Demo: http://b/331837110#comment4
Change-Id: I54d1fc81467cff56d669790f031488d5add14fdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426420
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Cici Ruan <cuicuiruan@google.com>
Commit-Queue: Khaya Kingston <khayak@google.com>
Cr-Commit-Position: refs/heads/main@{#1283366}
This commit is contained in:
Khaya Kingston
2024-04-05 20:39:34 +00:00
committed by Chromium LUCI CQ
parent 84b404b26a
commit ea73ac4b27
3 changed files with 7 additions and 3 deletions

@ -7607,6 +7607,9 @@ To shut down the device, press and hold the power button on the device again.
<message name="IDS_ASH_GAME_DASHBOARD_SCREEN_SIZE_SETTINGS_BUTTON_A11Y_LABEL" desc="Screen size settings button a11y label. Spoken by screen readers when the screen size settings button button gets focus but not visually rendered.">
Edit screen size
</message>
<message name="IDS_ASH_GAME_DASHBOARD_FEATURE_NOT_AVAILABLE_TOOLTIP" desc="Tooltip for when a feature in the Game Dashboard is unavailable.">
Not available for this game
</message>
<message name="IDS_ASH_GAME_DASHBOARD_SCREEN_SIZE_SETTINGS_TITLE" desc="The display name for the Game Dashboard screen size settings.">
Screen size
</message>

@ -0,0 +1 @@
e007aa48b07ad68664148c85c92c3753063d0cec

@ -324,6 +324,7 @@ class ScreenSizeRow : public views::Button {
break;
case ArcResizeLockType::NONE:
enabled = false;
tooltip = IDS_ASH_GAME_DASHBOARD_FEATURE_NOT_AVAILABLE_TOOLTIP;
break;
}
@ -420,9 +421,8 @@ class GameDashboardMainMenuView::GameControlsDetailsRow : public views::Button {
gfx::Insets::TLBR(0, 20, 0, 0));
setup_button_->SetEnabled(is_available);
if (!is_available) {
// TODO(b/274690042): Replace it with localized strings.
setup_button_->SetTooltipText(
u"This game does not support Game controls");
setup_button_->SetTooltipText(l10n_util::GetStringUTF16(
IDS_ASH_GAME_DASHBOARD_FEATURE_NOT_AVAILABLE_TOOLTIP));
}
} else {
const bool is_feature_enabled = IsGameControlsFeatureEnabled(*flags);