Skip to content

Commit

Permalink
resize headings on navigator window resize (#1643)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn authored Oct 28, 2024
1 parent 487ebf1 commit 76992ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions OneMore/Commands/Navigator/NavigatorWindow.Designer.cs

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

14 changes: 14 additions & 0 deletions OneMore/Commands/Navigator/NavigatorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,20 @@ private async void DoKeyDown(object sender, KeyEventArgs e)
e.Handled = true;
}
}


private void ResizePageBox(object sender, EventArgs e)
{
var margin = SystemInformation.VerticalScrollBarWidth * 2;

foreach (MoreLinkLabel link in pageBox.Controls)
{
var leftpad = ((Heading)link.Tag).Level * HeaderIndent;
var leftmar = leftpad + 4;
link.Width = pageBox.Width - leftmar - margin;

}
}
#endregion Page headings


Expand Down

0 comments on commit 76992ba

Please sign in to comment.