Skip to content

Commit

Permalink
Align webview label with main editor labels
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed May 16, 2023
1 parent a998d10 commit 56156c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Bonsai.Editor/GraphView/WorkflowEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,13 @@ private void InitializeTheme(TabPage tabPage)
else adjustRectangle.Bottom = adjustRectangle.Left;
tabControl.AdjustRectangle = adjustRectangle;

var labelOffset = browserLabel.Height - ItemHeight + 1;
if (themeRenderer.ActiveTheme == ColorTheme.Light && labelOffset < 0)
{
labelOffset += 1;
}
browserLayoutPanel.RowStyles[0].Height -= labelOffset;

var colorTable = themeRenderer.ToolStripRenderer.ColorTable;
browserLabel.BackColor = closeBrowserButton.BackColor = colorTable.SeparatorDark;
browserLabel.ForeColor = closeBrowserButton.ForeColor = colorTable.ControlForeColor;
Expand Down

0 comments on commit 56156c5

Please sign in to comment.