Skip to content

Commit

Permalink
improved pinning
Browse files Browse the repository at this point in the history
  • Loading branch information
factubsio committed Apr 2, 2022
1 parent 4d5cd4e commit 69e222c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions BlueprintExplorer/Form1.Designer.cs

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

8 changes: 4 additions & 4 deletions BlueprintExplorer/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,16 @@ public Form1()

private void UpdatePinResults(bool pinned)
{
var blueprintPadding = blueprintDockContainer.Margin;
var blueprintPadding = blueprintDockContainer.Padding;
blueprintPadding.Top = pinned ? 400 : 3;
blueprintDockContainer.Margin = blueprintPadding;
blueprintDockContainer.Padding = blueprintPadding;

ctrlP.Pinned = BubblePrints.Settings.PinSearchResults;
ctrlP.PinnedHeight = CtrlPPinnedHeight;
}

private Size CtrlPSize => new(ClientSize.Width - (ctrlP.Pinned ? 212 : 310), ctrlP.Pinned ? CtrlPPinnedHeight : blueprintDockContainer.Margin.Top);
private int CtrlPPinnedHeight => blueprintDockContainer.Margin.Top + topBarContainer.Height - 2;
private Size CtrlPSize => new(ClientSize.Width - (ctrlP.Pinned ? 212 : 310), ctrlP.Pinned ? CtrlPPinnedHeight : blueprintDockContainer.Padding.Top);
private int CtrlPPinnedHeight => blueprintDockContainer.Padding.Top + topBarContainer.Height - 2;
private Point CtrlPPos => PointToScreen(new(ctrlP.Pinned ? 2 : 100, 2));

protected override void OnMove(EventArgs e)
Expand Down

0 comments on commit 69e222c

Please sign in to comment.