Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabView keyboarding improvements #1151

Merged
merged 4 commits into from
Aug 12, 2019
Merged

TabView keyboarding improvements #1151

merged 4 commits into from
Aug 12, 2019

Conversation

kmahone
Copy link
Member

@kmahone kmahone commented Aug 9, 2019

Includes the following changes:

Ctrl+Tab/Ctrl+Shift+Tab to switch tabs.
This is implemented as a KeyboardAccelerator.
In order to get down-level RS2 devices to work, it is also implemented as a KeyDown handler behind a platform check. When WinUI 3 is available, we could remove the KeyDown implementation, since KeyboardAccelerator would be available everywhere.
Also updated the existing Ctrl+F4 behavior to use KeyDown on RS2.

Left/Right Arrow Navigation between tabs and '+' Button
This is enabled with XYFocusKeyboardNavigation. However, this hit an issue due to the fact that the tabs slightly overlap by 1px to get the desired visuals. This results in unusual 2d navigation: Up/Down would always navigate to a tab to the left of the right. A fix for this was added TabView::OnListViewGettingFocus to detect when this was happening and block it in the case of Keyboard (up/down should go nowhere) and forward focus elsewhere in the case of Gamepad.

High Contrast Fix
Updates selected tab color so that it is visible in High Contrast mode.

Added test cases for Keyboard and GamePad navigation

Middle Click closes tabs

Closes #1142

@kmahone kmahone requested a review from teaP August 9, 2019 20:33
@kmahone kmahone requested a review from a team as a code owner August 9, 2019 20:33
dev/TabView/TabView.cpp Outdated Show resolved Hide resolved
dev/TabView/TabView.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@teaP teaP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your help!

@kmahone kmahone merged commit 4017872 into master Aug 12, 2019
@kmahone kmahone deleted the user/kmahone/tabview branch August 12, 2019 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TabView: Middle click on tab should close the tab.
3 participants