SimpleClassicTheme.Taskbar icon indicating copy to clipboard operation
SimpleClassicTheme.Taskbar copied to clipboard

Fix taskbar overflow

Open Craftplacer opened this issue 3 years ago • 2 comments

image

Craftplacer avatar May 16 '21 09:05 Craftplacer

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

AEAEAEAE4343 avatar May 23 '21 22:05 AEAEAEAE4343

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).

Craftplacer avatar May 23 '21 23:05 Craftplacer