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

GUI: Improve tab widget #911

Merged
merged 4 commits into from Mar 1, 2017
Merged

GUI: Improve tab widget #911

merged 4 commits into from Mar 1, 2017

Conversation

wjp
Copy link
Contributor

@wjp wjp commented Feb 26, 2017

This does three things; see the individual commits for longer explanations:

  • Clean up a previous hacky fix to GlobalOptionsDialog::reflow() changing which tabs are visible.
  • Fix some invalid rects when radio/popup controls don't fully fit in their clip rects.
  • Make tab width dynamic to make more tabs fit on-screen.

Since the last one is potentially disruptive, I would appreciate feedback on any unexpected side effects.

@wjp
Copy link
Contributor Author

wjp commented Feb 26, 2017

I updated this PR to go quite a bit further than before: the individual tabs can now all have different widths, to make them even more space-efficient.

@wjp wjp force-pushed the tabs branch 3 times, most recently from b070503 to 5e9cb9f Compare February 27, 2017 06:18
@wjp wjp mentioned this pull request Feb 27, 2017
The width of each tab is now computed from its title, independently of
the other tabs. This increases the number of tabs that fit on the
screen.

This rewrite also fixes a bug where if the window size increased while
_firstVisibleTab > 0, some tabs would become inaccessible when the
scroll buttons were hidden.

The layout key Globals.TabWidget.Tab.Width is now treated as minimal
tab width. This is set so that the tabs fit reasonably well in lowres
layouts.

At the same time, this reduces the lowres scroll buttons heights to fit.

This patch makes the Nintento DS hacks in TabWidget obsolete.
(Hopefully! I'm not able to test.)
@rsn8887
Copy link
Contributor

rsn8887 commented Feb 28, 2017

Great work! I tested it on the Vita version, and it works great at all resolutions and with both standard layouts.

@wjp
Copy link
Contributor Author

wjp commented Feb 28, 2017

Giving it a few extra pixels does look better. I've changed that.

@sev-
Copy link
Member

sev- commented Mar 1, 2017

Great work! Merging.

@sev- sev- merged commit 7c259fe into scummvm:master Mar 1, 2017
@wjp wjp deleted the tabs branch March 1, 2017 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants