Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implemented the changes suggested by @ldn4711.

  • Loading branch information...
commit 2d626d16964f8294ac9dca2402bd3fa69e7739ac 1 parent 8303c2b
@lextm lextm authored
Showing with 16 additions and 12 deletions.
  1. +16 −12 WinFormsUI/Docking/DockPanel.AutoHideWindow.cs
View
28 WinFormsUI/Docking/DockPanel.AutoHideWindow.cs
@@ -477,31 +477,31 @@ void ISplitterDragSource.MoveSplitter(int offset)
IDockContent content = ActiveContent;
if (DockState == DockState.DockLeftAutoHide && rectDockArea.Width > 0)
{
- if (content.DockHandler.AutoHidePortion < 1)
- content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Width;
+ if (content.DockHandler.DockPanel.DockLeftPortion < 1)
+ content.DockHandler.DockPanel.DockLeftPortion += ((double)offset) / (double)rectDockArea.Width;
else
- content.DockHandler.AutoHidePortion = Width + offset;
+ content.DockHandler.DockPanel.DockLeftPortion = Width + offset;
}
else if (DockState == DockState.DockRightAutoHide && rectDockArea.Width > 0)
{
- if (content.DockHandler.AutoHidePortion < 1)
- content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Width;
+ if (content.DockHandler.DockPanel.DockRightPortion < 1)
+ content.DockHandler.DockPanel.DockRightPortion -= ((double)offset) / (double)rectDockArea.Width;
else
- content.DockHandler.AutoHidePortion = Width - offset;
+ content.DockHandler.DockPanel.DockRightPortion = Width - offset;
}
else if (DockState == DockState.DockBottomAutoHide && rectDockArea.Height > 0)
{
- if (content.DockHandler.AutoHidePortion < 1)
- content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Height;
+ if (content.DockHandler.DockPanel.DockTopPortion < 1)
+ content.DockHandler.DockPanel.DockTopPortion -= ((double)offset) / (double)rectDockArea.Height;
else
- content.DockHandler.AutoHidePortion = Height - offset;
+ content.DockHandler.DockPanel.DockTopPortion = Height - offset;
}
else if (DockState == DockState.DockTopAutoHide && rectDockArea.Height > 0)
{
- if (content.DockHandler.AutoHidePortion < 1)
- content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Height;
+ if (content.DockHandler.DockPanel.DockBottomPortion < 1)
+ content.DockHandler.DockPanel.DockBottomPortion += ((double)offset) / (double)rectDockArea.Height;
else
- content.DockHandler.AutoHidePortion = Height + offset;
+ content.DockHandler.DockPanel.DockBottomPortion = Height + offset;
}
}
@@ -548,6 +548,7 @@ internal Rectangle AutoHideWindowRectangle
double autoHideSize = ActiveAutoHideContent.DockHandler.AutoHidePortion;
if (state == DockState.DockLeftAutoHide)
{
+ autoHideSize = DockLeftPortion;
if (autoHideSize < 1)
autoHideSize = rectDockArea.Width * autoHideSize;
if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
@@ -559,6 +560,7 @@ internal Rectangle AutoHideWindowRectangle
}
else if (state == DockState.DockRightAutoHide)
{
+ autoHideSize = DockRightPortion;
if (autoHideSize < 1)
autoHideSize = rectDockArea.Width * autoHideSize;
if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
@@ -570,6 +572,7 @@ internal Rectangle AutoHideWindowRectangle
}
else if (state == DockState.DockTopAutoHide)
{
+ autoHideSize = DockTopPortion;
if (autoHideSize < 1)
autoHideSize = rectDockArea.Height * autoHideSize;
if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
@@ -581,6 +584,7 @@ internal Rectangle AutoHideWindowRectangle
}
else if (state == DockState.DockBottomAutoHide)
{
+ autoHideSize = DockBottomPortion;
if (autoHideSize < 1)
autoHideSize = rectDockArea.Height * autoHideSize;
if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
Please sign in to comment.
Something went wrong with that request. Please try again.