Skip to content

Commit

Permalink
Merge pull request #1 from apoch/uibug
Browse files Browse the repository at this point in the history
Add some diagnostic stuff to track down UI bug apoch#41
  • Loading branch information
taoshang committed Oct 16, 2018
2 parents 7def53a + 0d0915b commit b0f3391
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,31 @@ private void SetWindowCaption(bool dirty)
Text = $"Curvature Studio - [{EditingFileName}]";
}
}

private void UIDiagnosticsToolStripMenuItem_Click(object sender, EventArgs e)
{
var output = new StringBuilder();

output.AppendLine($"Window font face: {Font.Name}");
output.AppendLine($"Window font size: {Font.Size}");

output.AppendLine($"Autoscale factor X: {AutoScaleFactor.Width}");
output.AppendLine($"Autoscale factor Y: {AutoScaleFactor.Height}");

output.AppendLine($"Autoscale basis X: {AutoScaleDimensions.Width}");
output.AppendLine($"Autoscale basis Y: {AutoScaleDimensions.Height}");

output.AppendLine($"Autoscale current X: {CurrentAutoScaleDimensions.Width}");
output.AppendLine($"Autoscale current Y: {CurrentAutoScaleDimensions.Height}");

output.AppendLine($"Scenarios Autoscale basis X: {ScenariosEditWidget.AutoScaleDimensions.Width}");
output.AppendLine($"Scenarios Autoscale basis Y: {ScenariosEditWidget.AutoScaleDimensions.Height}");

output.AppendLine($"Scenarios Autoscale current X: {ScenariosEditWidget.CurrentAutoScaleDimensions.Width}");
output.AppendLine($"Scenarios Autoscale current Y: {ScenariosEditWidget.CurrentAutoScaleDimensions.Height}");

Clipboard.SetText(output.ToString());
MessageBox.Show("Copied diagnostic data to clipboard");
}
}
}

0 comments on commit b0f3391

Please sign in to comment.