SimpleClassicTheme.Taskbar
SimpleClassicTheme.Taskbar copied to clipboard
Fix taskbar overflow
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
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).