Commit 24d31c46 authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Commit Bot

Show rotated back button while ARC IME shows up.

While ARC IME shows up, the back button is used for hiding the virtual
keyboard. This CL rotates the back button while ARC IME shows up to
align with the behavior.

Bug: 845079, 894362
Test: Ran on DUT
Change-Id: Ib96249fa7e9cae23b6b6810780b30c00ba4874c8
Reviewed-on: https://chromium-review.googlesource.com/c/1275987Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599007}
parent 9c5301d7
......@@ -2224,7 +2224,16 @@ bool ShelfView::CanPrepareForDrag(Pointer pointer,
}
void ShelfView::UpdateBackButton() {
const bool virtual_keyboard_visible =
Shell::Get()->system_tray_model()->virtual_keyboard()->visible();
gfx::Transform rotation;
// Rotate the back button when virtual keyboard is visible.
if (virtual_keyboard_visible) {
rotation.Rotate(270.0);
rotation.Translate(-GetBackButton()->height(), 0);
}
GetBackButton()->layer()->SetOpacity(IsTabletModeEnabled() ? 1.f : 0.f);
GetBackButton()->layer()->SetTransform(rotation);
GetBackButton()->SetFocusBehavior(
IsTabletModeEnabled() ? FocusBehavior::ALWAYS : FocusBehavior::NEVER);
}
......
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