Incorrect toolbar location at 125%+ scale factor
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
Presumably all versions:
* .NET Framework: 4.6.1 (tested)
* .NET Version: 5.0 (tested)
**Problem description:**
Originally reported in https://github.com/gitextensions/gitextensions/issues/8680.
An application with two toolbars placed on the same lane, one after another. When the app is run in scaled environments (i.e. 125%+) the toolbars will get re-odered if the first toolbar becomes longer than the location of the second toolbar.
The same problem isn't observed at 100% scale factor, or if the repro app doesn't use its app.manifest.
* Designer:

* Runtime 100%

* Runtime 150%

**Expected behavior:**
The order of the toolbars set at the design time must be preserved.
A workaround is to remove all toolbars after `InitializeComponent();` and add them back in the correct order, e.g.:
```cs
public FormBrowse()
{
InitializeComponent();
this.toolPanel.TopToolStripPanel.Controls.Clear();
this.toolPanel.TopToolStripPanel.Controls.Add(this.ToolStripFilters);
this.toolPanel.TopToolStripPanel.Controls.Add(this.ToolStripMain);
}
```
**Minimal repro:**
1. clone https://github.com/RussKie/Test-ToolStripOrder
2. run the app at 100% - observe `ToolStripMain` before `ToolStripFilters`
3. run the app at 150%+ - observe the reverse order of toolbars
Contributor guide
Assessment
This issue has not been assessed yet.