Browse Source

Reapply our patches to the DockPanel Suite.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2706 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
51b2ea1d23
  1. 26
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs
  2. 20
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs
  3. 8
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/VS2005DockPaneCaption.cs
  4. 2
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/VS2005DockPaneStrip.cs
  5. 4
      src/Libraries/DockPanel_Src/WinFormsUI/Properties/AssemblyInfo.cs
  6. 3
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj
  7. 24
      src/Libraries/DockPanel_Src/patchnotes.txt

26
src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripBase.cs

@ -20,23 +20,12 @@ namespace WeifenLuo.WinFormsUI.Docking
m_content = content; m_content = content;
} }
~Tab()
{
Dispose(false);
}
public IDockContent Content public IDockContent Content
{ {
get { return m_content; } get { return m_content; }
} }
public void Dispose() public virtual void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{ {
} }
} }
@ -126,11 +115,6 @@ namespace WeifenLuo.WinFormsUI.Docking
m_dockPane = dockPane; m_dockPane = dockPane;
} }
~Pane()
{
Dispose(false);
}
public DockPane DockPane public DockPane DockPane
{ {
get { return m_dockPane; } get { return m_dockPane; }
@ -146,13 +130,7 @@ namespace WeifenLuo.WinFormsUI.Docking
} }
} }
public void Dispose() public virtual void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{ {
} }
} }

20
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs

@ -21,11 +21,6 @@ namespace WeifenLuo.WinFormsUI.Docking
m_content = content; m_content = content;
} }
~Tab()
{
Dispose(false);
}
public IDockContent Content public IDockContent Content
{ {
get { return m_content; } get { return m_content; }
@ -36,13 +31,7 @@ namespace WeifenLuo.WinFormsUI.Docking
get { return m_content as Form; } get { return m_content as Form; }
} }
public void Dispose() public virtual void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{ {
} }
} }
@ -229,6 +218,13 @@ namespace WeifenLuo.WinFormsUI.Docking
content.DockHandler.IsFloat = !content.DockHandler.IsFloat; content.DockHandler.IsFloat = !content.DockHandler.IsFloat;
} }
return;
} else if (m.Msg == (int)Win32.Msgs.WM_MBUTTONUP) {
base.WndProc(ref m);
int index = HitTest();
if (index != -1) {
DockPane.CloseContent(Tabs[index].Content);
}
return; return;
} }

8
src/Libraries/DockPanel_Src/WinFormsUI/Docking/VS2005DockPaneCaption.cs

@ -299,12 +299,7 @@ namespace WeifenLuo.WinFormsUI.Docking
{ {
get get
{ {
string colorScheme = VisualStyleInformation.ColorScheme; return SystemColors.Control;
if (colorScheme == "HomeStead" || colorScheme == "Metallic")
return SystemColors.GradientInactiveCaption;
else
return SystemColors.GrayText;
} }
} }
@ -373,6 +368,7 @@ namespace WeifenLuo.WinFormsUI.Docking
{ {
g.FillRectangle(brush, ClientRectangle); g.FillRectangle(brush, ClientRectangle);
} }
g.DrawRectangle(SystemPens.ControlDark, new Rectangle(0, 0, ClientSize.Width - 1, ClientSize.Height - 1));
} }
Rectangle rectCaption = ClientRectangle; Rectangle rectCaption = ClientRectangle;

2
src/Libraries/DockPanel_Src/WinFormsUI/Docking/VS2005DockPaneStrip.cs

@ -422,7 +422,7 @@ namespace WeifenLuo.WinFormsUI.Docking
private static Brush BrushToolWindowActiveBackground private static Brush BrushToolWindowActiveBackground
{ {
get { return SystemBrushes.Control; } get { return SystemBrushes.ControlLightLight; }
} }
private static Brush BrushDocumentActiveBackground private static Brush BrushDocumentActiveBackground

4
src/Libraries/DockPanel_Src/WinFormsUI/Properties/AssemblyInfo.cs

@ -18,8 +18,8 @@ using System.Diagnostics.CodeAnalysis;
[assembly: Guid("9d690ef9-ce19-4c69-874c-e24d8eb36aff")] [assembly: Guid("9d690ef9-ce19-4c69-874c-e24d8eb36aff")]
[assembly: AssemblyVersion("2.1.*")] [assembly: AssemblyVersion("2.1.0.1")]
[assembly: AssemblyFileVersion("2.1.0.0")] [assembly: AssemblyFileVersion("2.1.0.1")]
[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Weifen")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Weifen")]
[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Luo")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Luo")]

3
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

@ -157,6 +157,9 @@
</Compile> </Compile>
<Compile Include="Docking\Win32\Enums.cs" /> <Compile Include="Docking\Win32\Enums.cs" />
<Compile Include="Docking\Win32\NativeMethods.cs" /> <Compile Include="Docking\Win32\NativeMethods.cs" />
<None Include="..\patchnotes.txt">
<Link>patchnotes.txt</Link>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Docking\Resources.resx"> <EmbeddedResource Include="Docking\Resources.resx">

24
src/Libraries/DockPanel_Src/patchnotes.txt

@ -1,20 +1,10 @@
List of our custom patches to apply to the DockPanel Suite: List of our custom patches to apply to the DockPanel Suite:
Patch #1: Patch #0:
Close documents with middle click - in DockPaneTabStripBase.cs Add bool IsDisposed { get; } to IDockContent interface.
Remove redundant finalizers - in AutoHidePane.cs and AutoHideTab.cs
Remove redundant P/Invoke call - in AutoHideStripBase.cs
Fix compilation warning - in InertButton.cs
Committed in revision 1147.
Patch #2:
Fixed CREATESTRUCT, MDICREATESTRUCT and WINDOWPOS P/Invoke structure declarations:
use IntPtr instead of int - we have to use a pointer-size integers here for 64-bit systems
Committed in revision 1335.
Reported to SF: http://sourceforge.net/tracker/index.php?func=detail&aid=1438642&group_id=110642&atid=659401
The fix was accepted and will be in the next release of the library.
Patch #3: Patch #1:
Activate the autohide pad explicitly - in DockContentHandler.cs Close documents with middle click - in DockPaneStripBase.cs
(DockContentHandler.Activate()) Remove redundant finalizers - in AutoHideStripBase.cs, DockPaneStripBase.cs
Committed in revision 1840. Changed background color of inactive pads. - in VS2005DockPaneCaption.cs, VS2005DockPaneStip.cs
Committed in revision 2706.

Loading…
Cancel
Save