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

Fix taskbar overflow #23

Open
Craftplacer opened this issue May 16, 2021 · 2 comments
Open

Fix taskbar overflow #23

Craftplacer opened this issue May 16, 2021 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Craftplacer
Copy link
Contributor

image

@Craftplacer Craftplacer added bug Something isn't working enhancement New feature or request labels May 16, 2021
@AEAEAEAE4343
Copy link
Collaborator

I think the general direction we're going in is:

  • Create a 'TabBar' control that hosts the controls
  • When it reaches a specific size (eg 80px) stop making controls smaller
  • Create a second tab bar and add buttons to switch between the tab bars in order to get the same effect as in the image

@Craftplacer
Copy link
Contributor Author

Craftplacer commented May 23, 2021

Create a 'TabBar'

Unrelated to the issue, I think we need to come up with a name we use to call those taskbar buttons (maybe look around Windows dev docs to find out how they're called?)

When it reaches a specific size (eg 80px) stop making controls smaller

Probably something like

var maxButtonWidth = availableSpace / amountOfPrograms;
var actualButtonWidth = Math.Min(maxButtonWidth, 100/*pixels*/); // take default size or smaller

var doWrap = maxButtonWidth < 80/*pixels*/;
if (doWrap)
  /* split list of programs into pages... */

Create a second tab bar

Could work, there are other approaches to take though, like resetting the displayed buttons or hiding/showing them (while locking UI updates to prevent flicker and unnecessary repaints).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants