-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: change pages with ctrl-tab #199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good to me now!
I didn't test anything (only looked at code) though. So @shpaass might want to test before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't removing the pane from the display pages list
Oh... When you close a page it is not deleted, so I doubt removing from the list is a good thing...
I can take a (better) look tomorrow (quite late here already), or maybe someone else can (double) check
Use the common browser interaction ctrl-tab to switch pages forward and alt-tab to switch pages back. Implementation-wise, we have to break a little layering by using the displayPages list of guids that really only the tab bar is supposed to care about... but we have to call ChangePage in the main screen, so I'm not sure how else to do it. The other change of note is forcing a focus change when you switch tabs; this is to get any active dropdowns (i.e. the GoodsIcon dropdowns for switching recipes or switching modules) to disappear if you hit control-tab while one is open, since the mouse isn't otherwise moving and clicking like it would be if you switched tabs with the mouse.
- Changelog update - Clarify just why we're resetting focus there
Also, fix a data consistency issue - the page delete button in the page settings pane wasn't removing the pane from the display pages list, just marking it for deletion. The page still wouldn't be displayed but it would be in the list, which wasn't an issue when we just pick items out of the list based on what's displayed but became an issue when we iterate through it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your extended explanation, this is indeed the intended behavior.
Use the common browser interaction ctrl-tab to switch pages forward and shift-tab to switch pages back.
Implementation-wise, we have to break a little layering by using the displayPages list of guids that really only the tab bar is supposed to care about... but we have to call ChangePage in the main screen, so I'm not sure how else to do it.
The other change of note is forcing a focus change when you switch tabs; this is to get any active dropdowns (i.e. the GoodsIcon dropdowns for switching recipes or switching modules) to disappear if you hit control-tab while one is open, since the mouse isn't otherwise moving and clicking like it would be if you switched tabs with the mouse.
It's also a pretty good way to test #198 by just holding down the button!
This branch has both.That got merged and I rebased so you can just test that on a build of this branch