-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Toolbar position is not saved or restored #8680
Comments
I will give it a try to see if that changes the behavior.
The same. And it is a pain to successfully arrange them... |
This comment has been minimized.
This comment has been minimized.
This is very gnarly one... I've spent several hours trying different thigs, but so far I couldn't get it working reliably. Reading and then setting the same location moves a toolbar laterally. |
Due to discovered layout and placement instability of toolbars reverting most of the functionality added in gitextensions#8572. Closes gitextensions#8680
The toolbar gets pushed by something: It is wild, and requires a deeper investigation. It's plausible there's something in our codebase that's causing it, similar to the weird behaviours observed in #8698 (comment). |
Due to discovered layout and placement instability of toolbars reverting most of the functionality added in gitextensions#8572. Closes gitextensions#8680
Due to discovered layout and placement instability of toolbars reverting most of the functionality added in gitextensions#8572. Closes gitextensions#8680
I've debugged the Windows Forms source, and it looks like the implementation isn't working correctly when a toolstrip panel has non-zero padding. The following workaround appears to yield the expected results: public override void OnLoad(EventArgs e)
{
// Restore the toolbars layout
ToolStripManager.LoadSettings(this, "toolsettings");
// Apply the padding
this.toolPanel.TopToolStripPanel.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
}
protected override void OnFormClosing(FormClosingEventArgs e)
{
// Reset padding to zero before saving
this.toolPanel.TopToolStripPanel.Padding = new System.Windows.Forms.Padding(0, 0, 0, 0);
// Persist the toolbars layout
ToolStripManager.SaveSettings(this, "toolsettings");
} |
Reintroduce ability to move toolstrips (as proposed in gitextensions#8572). This implementation is heavily influenced by the original implementation ToolStripSettingsManager in Windows Forms, however we only track visibility and location of each individual toolstrip. We're also only saving specified toolstrips as opposed to saving all known toolstrips (which in various situations results in terminal failures to restore toolstrips information). There are two key changes: 1. Restore toolstrip locations after the form's geometry has been restored. This ensures the toolstrips can be placed at the same coords as they were saved. 2. Hosting ToolStripPanel's padding must be set to 0 before toolstrips' locations can be restored/saved. This mitigates dotnet/winforms#4449 Fixes gitextensions#8680 Reverts gitextensions#8719
Reintroduce ability to move toolstrips (as proposed in gitextensions#8572). This implementation is heavily influenced by the original implementation ToolStripSettingsManager in Windows Forms, however we only track visibility and location of each individual toolstrip. We're also only saving specified toolstrips as opposed to saving all known toolstrips (which in various situations results in terminal failures to restore toolstrips information). There are two key changes: 1. Restore toolstrip locations after the form's geometry has been restored. This ensures the toolstrips can be placed at the same coords as they were saved. 2. Hosting ToolStripPanel's padding must be set to 0 before toolstrips' locations can be restored/saved. This mitigates dotnet/winforms#4449 Fixes gitextensions#8680 Reverts gitextensions#8719
Reintroduce ability to move toolstrips (as proposed in gitextensions#8572). This implementation is heavily influenced by the original implementation ToolStripSettingsManager in Windows Forms, however we only track visibility and location of each individual toolstrip. We're also only saving specified toolstrips as opposed to saving all known toolstrips (which in various situations results in terminal failures to restore toolstrips information). There are two key changes: 1. Restore toolstrip locations after the form's geometry has been restored. This ensures the toolstrips can be placed at the same coords as they were saved. 2. Hosting ToolStripPanel's padding must be set to 0 before toolstrips' locations can be restored/saved. This mitigates dotnet/winforms#4449 Fixes gitextensions#8680 Reverts gitextensions#8719
Current behaviour
Since #8572, I always end up with this toolbar at startup:
![image](https://user-images.githubusercontent.com/460196/100364490-8127cd00-2ffe-11eb-8419-99404f78f46b.png)
Even if I move the toolbars. Even when only on instance is opened.
Even with #8679 fix (to only save the toolbar settings)
Expected behaviour
I can configure the toolbar position and it is saved (or restored) well.
Steps to reproduce
Screenshots
See above.
Did this work in previous version of GitExtensions
Never since the feature was introduced...
Environment
Diagnostics
The main goal to opening this issue is:
How can I debug it easily?
Where the configuration data are stored?
The text was updated successfully, but these errors were encountered: