Browse Source

Add back GrayOutDesignerExceptActiveArea.

Layout update for watch pad.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3496 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
a2c9321fef
  1. BIN
      data/resources/image/BitmapResources/SharpDevelop Icon.png
  2. 80
      data/resources/layouts/Debug.xml
  3. 26
      data/resources/layouts/Default.xml
  4. 9
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs
  5. 19
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs
  6. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/OptionService.cs

BIN
data/resources/image/BitmapResources/SharpDevelop Icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

80
data/resources/layouts/Debug.xml

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--DockPanel configuration file. Author: Weifen Luo, all rights reserved.-->
<!--!!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!-->
<DockPanel FormatVersion="1.0" DockLeftPortion="0.196180555555556" DockRightPortion="0.171180555555556" DockTopPortion="0.25" DockBottomPortion="0.25" ActiveDocumentPane="-1" ActivePane="-1">
<Contents Count="30">
<DockPanel FormatVersion="1.0" DockLeftPortion="0.196180555555556" DockRightPortion="0.171180555555556" DockTopPortion="0.25" DockBottomPortion="0.25" ActiveDocumentPane="10" ActivePane="-1">
<Contents Count="32">
<Content ID="0" PersistString="ICSharpCode.SharpDevelop.Project.ProjectBrowserPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="1" PersistString="ICSharpCode.SharpDevelop.Gui.ClassBrowser.ClassBrowserPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="2" PersistString="ICSharpCode.SharpDevelop.Gui.ErrorListPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
@ -29,12 +29,14 @@ @@ -29,12 +29,14 @@
<Content ID="23" PersistString="ICSharpCode.SharpDevelop.Gui.ToolsPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="24" PersistString="ClassDiagramAddin.ClassEditorPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="25" PersistString="ICSharpCode.UnitTesting.UnitTestsPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="26" PersistString="FSharpBinding.FSharpInteractive" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="27" PersistString="ICSharpCode.PythonBinding.PythonConsolePad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="28" PersistString="Grunwald.BooBinding.InteractiveInterpreterPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="29" PersistString="ICSharpCode.SharpDevelop.Gui.Pads.ConsolePad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="26" PersistString="ICSharpCode.PythonBinding.PythonConsolePad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="27" PersistString="Grunwald.BooBinding.InteractiveInterpreterPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="28" PersistString="ICSharpCode.SharpDevelop.Gui.Pads.ConsolePad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="29" PersistString="ICSharpCode.SharpDevelop.Gui.Pads.WatchPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="30" PersistString="ICSharpCode.SharpDevelop.Gui.SdiWorkspaceWindow" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="31" PersistString="FSharpBinding.FSharpInteractive" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
</Contents>
<Panes Count="9">
<Panes Count="11">
<Pane ID="0" DockState="DockLeft" ActiveContent="0">
<Contents Count="3">
<Content ID="0" RefID="0" />
@ -57,29 +59,24 @@ @@ -57,29 +59,24 @@
</Contents>
</Pane>
<Pane ID="3" DockState="DockBottom" ActiveContent="4">
<Contents Count="22">
<Contents Count="17">
<Content ID="0" RefID="2" />
<Content ID="1" RefID="4" />
<Content ID="2" RefID="15" />
<Content ID="3" RefID="14" />
<Content ID="4" RefID="27" />
<Content ID="4" RefID="26" />
<Content ID="5" RefID="3" />
<Content ID="6" RefID="10" />
<Content ID="7" RefID="26" />
<Content ID="8" RefID="9" />
<Content ID="9" RefID="8" />
<Content ID="10" RefID="7" />
<Content ID="11" RefID="5" />
<Content ID="12" RefID="24" />
<Content ID="13" RefID="23" />
<Content ID="14" RefID="19" />
<Content ID="15" RefID="18" />
<Content ID="16" RefID="17" />
<Content ID="17" RefID="16" />
<Content ID="18" RefID="20" />
<Content ID="19" RefID="28" />
<Content ID="20" RefID="25" />
<Content ID="21" RefID="11" />
<Content ID="7" RefID="9" />
<Content ID="8" RefID="8" />
<Content ID="9" RefID="7" />
<Content ID="10" RefID="24" />
<Content ID="11" RefID="23" />
<Content ID="12" RefID="19" />
<Content ID="13" RefID="20" />
<Content ID="14" RefID="27" />
<Content ID="15" RefID="11" />
<Content ID="16" RefID="31" />
</Contents>
</Pane>
<Pane ID="4" DockState="Float" ActiveContent="-1">
@ -93,10 +90,11 @@ @@ -93,10 +90,11 @@
</Contents>
</Pane>
<Pane ID="6" DockState="DockBottom" ActiveContent="12">
<Contents Count="3">
<Contents Count="4">
<Content ID="0" RefID="12" />
<Content ID="1" RefID="13" />
<Content ID="2" RefID="29" />
<Content ID="2" RefID="28" />
<Content ID="3" RefID="29" />
</Contents>
</Pane>
<Pane ID="7" DockState="Float" ActiveContent="-1">
@ -106,15 +104,31 @@ @@ -106,15 +104,31 @@
<Content ID="2" RefID="14" />
</Contents>
</Pane>
<Pane ID="8" DockState="Float" ActiveContent="-1">
<Pane ID="8" DockState="DockRight" ActiveContent="-1">
<Contents Count="5">
<Content ID="0" RefID="5" />
<Content ID="1" RefID="25" />
<Content ID="2" RefID="17" />
<Content ID="3" RefID="18" />
<Content ID="4" RefID="16" />
</Contents>
</Pane>
<Pane ID="9" DockState="Float" ActiveContent="-1">
<Contents Count="1">
<Content ID="0" RefID="26" />
<Content ID="0" RefID="29" />
</Contents>
</Pane>
<Pane ID="10" DockState="Document" ActiveContent="30">
<Contents Count="1">
<Content ID="0" RefID="30" />
</Contents>
</Pane>
</Panes>
<DockWindows>
<DockWindow ID="0" DockState="Document" ZOrderIndex="1">
<NestedPanes Count="0" />
<NestedPanes Count="1">
<Pane ID="0" RefID="10" PrevPane="-1" Alignment="Right" Proportion="0.5" />
</NestedPanes>
</DockWindow>
<DockWindow ID="1" DockState="DockLeft" ZOrderIndex="4">
<NestedPanes Count="1">
@ -122,7 +136,9 @@ @@ -122,7 +136,9 @@
</NestedPanes>
</DockWindow>
<DockWindow ID="2" DockState="DockRight" ZOrderIndex="2">
<NestedPanes Count="0" />
<NestedPanes Count="1">
<Pane ID="0" RefID="8" PrevPane="-1" Alignment="Bottom" Proportion="0.5" />
</NestedPanes>
</DockWindow>
<DockWindow ID="3" DockState="DockTop" ZOrderIndex="3">
<NestedPanes Count="0" />
@ -160,9 +176,9 @@ @@ -160,9 +176,9 @@
<Pane ID="0" RefID="7" PrevPane="-1" Alignment="Right" Proportion="0.5" />
</NestedPanes>
</FloatWindow>
<FloatWindow ID="5" Bounds="272, 363, 300, 300" ZOrderIndex="5">
<FloatWindow ID="5" Bounds="1060, 71, 300, 300" ZOrderIndex="5">
<NestedPanes Count="1">
<Pane ID="0" RefID="8" PrevPane="-1" Alignment="Right" Proportion="0.5" />
<Pane ID="0" RefID="9" PrevPane="-1" Alignment="Right" Proportion="0.5" />
</NestedPanes>
</FloatWindow>
</FloatWindows>

26
data/resources/layouts/Default.xml

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--DockPanel configuration file. Author: Weifen Luo, all rights reserved.-->
<!--!!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!-->
<DockPanel FormatVersion="1.0" DockLeftPortion="0.196180555555556" DockRightPortion="0.172743055555556" DockTopPortion="0.25" DockBottomPortion="0.25" ActiveDocumentPane="5" ActivePane="-1">
<DockPanel FormatVersion="1.0" DockLeftPortion="0.196180555555556" DockRightPortion="0.172743055555556" DockTopPortion="0.25" DockBottomPortion="0.25" ActiveDocumentPane="-1" ActivePane="-1">
<Contents Count="31">
<Content ID="0" PersistString="ICSharpCode.SharpDevelop.Project.ProjectBrowserPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="1" PersistString="ICSharpCode.SharpDevelop.Gui.ClassBrowser.ClassBrowserPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
@ -29,13 +29,13 @@ @@ -29,13 +29,13 @@
<Content ID="23" PersistString="ICSharpCode.UnitTesting.UnitTestsPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="24" PersistString="ICSharpCode.SharpDevelop.Gui.ToolsPad" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="25" PersistString="ClassDiagramAddin.ClassEditorPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="26" PersistString="FSharpBinding.FSharpInteractive" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="27" PersistString="Grunwald.BooBinding.InteractiveInterpreterPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="28" PersistString="ICSharpCode.PythonBinding.PythonConsolePad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="29" PersistString="ICSharpCode.SharpDevelop.Gui.Pads.ConsolePad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="30" PersistString="ICSharpCode.SharpDevelop.Gui.SdiWorkspaceWindow" AutoHidePortion="0.25" IsHidden="False" IsFloat="False" />
<Content ID="26" PersistString="Grunwald.BooBinding.InteractiveInterpreterPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="27" PersistString="ICSharpCode.PythonBinding.PythonConsolePad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="28" PersistString="ICSharpCode.SharpDevelop.Gui.Pads.ConsolePad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="29" PersistString="ICSharpCode.SharpDevelop.Gui.Pads.WatchPad" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
<Content ID="30" PersistString="FSharpBinding.FSharpInteractive" AutoHidePortion="0.25" IsHidden="True" IsFloat="False" />
</Contents>
<Panes Count="6">
<Panes Count="5">
<Pane ID="0" DockState="DockRight" ActiveContent="5">
<Contents Count="6">
<Content ID="0" RefID="5" />
@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
</Contents>
</Pane>
<Pane ID="3" DockState="DockBottom" ActiveContent="4">
<Contents Count="12">
<Contents Count="13">
<Content ID="0" RefID="2" />
<Content ID="1" RefID="4" />
<Content ID="2" RefID="3" />
@ -76,6 +76,7 @@ @@ -76,6 +76,7 @@
<Content ID="9" RefID="27" />
<Content ID="10" RefID="28" />
<Content ID="11" RefID="29" />
<Content ID="12" RefID="30" />
</Contents>
</Pane>
<Pane ID="4" DockState="DockRight" ActiveContent="-1">
@ -89,17 +90,10 @@ @@ -89,17 +90,10 @@
<Content ID="6" RefID="11" />
</Contents>
</Pane>
<Pane ID="5" DockState="Document" ActiveContent="30">
<Contents Count="1">
<Content ID="0" RefID="30" />
</Contents>
</Pane>
</Panes>
<DockWindows>
<DockWindow ID="0" DockState="Document" ZOrderIndex="1">
<NestedPanes Count="1">
<Pane ID="0" RefID="5" PrevPane="-1" Alignment="Right" Proportion="0.5" />
</NestedPanes>
<NestedPanes Count="0" />
</DockWindow>
<DockWindow ID="1" DockState="DockLeft" ZOrderIndex="4">
<NestedPanes Count="1">

9
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs

@ -21,8 +21,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls @@ -21,8 +21,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
/// </summary>
sealed class GrayOutDesignerExceptActiveArea : FrameworkElement
{
//Geometry infiniteRectangle = new RectangleGeometry(new Rect(0, 0, double.PositiveInfinity, double.PositiveInfinity));
Geometry infiniteRectangle = new RectangleGeometry(new Rect(-100, -100, 10000, 10000));
Geometry designSurfaceRectangle;
Geometry activeAreaGeometry;
Geometry combinedGeometry;
Brush grayOutBrush;
@ -46,7 +45,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls @@ -46,7 +45,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
get { return activeAreaGeometry; }
set {
activeAreaGeometry = value;
combinedGeometry = new CombinedGeometry(GeometryCombineMode.Exclude, infiniteRectangle, activeAreaGeometry);
combinedGeometry = new CombinedGeometry(GeometryCombineMode.Exclude, designSurfaceRectangle, activeAreaGeometry);
}
}
@ -78,10 +77,12 @@ namespace ICSharpCode.WpfDesign.Designer.Controls @@ -78,10 +77,12 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
{
Debug.Assert(services != null);
Debug.Assert(activeContainer != null);
IDesignPanel designPanel = services.GetService<IDesignPanel>();
DesignPanel designPanel = services.GetService<IDesignPanel>() as DesignPanel;
OptionService optionService = services.GetService<OptionService>();
if (designPanel != null && grayOut == null && optionService != null && optionService.GrayOutDesignSurfaceExceptParentContainerWhenDragging) {
grayOut = new GrayOutDesignerExceptActiveArea();
grayOut.designSurfaceRectangle = new RectangleGeometry(
new Rect(new Point(0, 0), designPanel.RenderSize));
grayOut.designPanel = designPanel;
grayOut.adornerPanel = new AdornerPanel();
grayOut.adornerPanel.Order = AdornerOrder.BehindForeground;

19
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs

@ -37,9 +37,9 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -37,9 +37,9 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
//{
// FrameworkElement obj = child.Component as FrameworkElement;
// if (obj == null) return new Rect();
// Thickness margin = obj.Margin;
// double left, width, right;
// switch (obj.HorizontalAlignment) {
// case HorizontalAlignment.Stretch:
@ -62,7 +62,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -62,7 +62,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
// default:
// throw new NotSupportedException();
// }
// double top, height, bottom;
// switch (obj.VerticalAlignment) {
// case VerticalAlignment.Stretch:
@ -199,6 +199,14 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -199,6 +199,14 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
}
}
GrayOutDesignerExceptActiveArea grayOut;
public override void EndPlacement(PlacementOperation operation)
{
GrayOutDesignerExceptActiveArea.Stop(ref grayOut);
base.EndPlacement(operation);
}
public override void SetPosition(PlacementInformation info)
{
base.SetPosition(info);
@ -219,6 +227,11 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -219,6 +227,11 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
new Point(GetColumnOffset(leftColumnIndex), GetRowOffset(topRowIndex)),
new Point(GetColumnOffset(rightColumnIndex + 1), GetRowOffset(bottomRowIndex + 1))
);
if (grayOut != null) {
grayOut.AnimateActiveAreaRectTo(availableSpaceRect);
} else {
GrayOutDesignerExceptActiveArea.Start(ref grayOut, this.Services, this.ExtendedItem.View, availableSpaceRect);
}
HorizontalAlignment ha = (HorizontalAlignment)info.Item.Properties[FrameworkElement.HorizontalAlignmentProperty].ValueOnInstance;
VerticalAlignment va = (VerticalAlignment)info.Item.Properties[FrameworkElement.VerticalAlignmentProperty].ValueOnInstance;

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/OptionService.cs

@ -17,6 +17,6 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -17,6 +17,6 @@ namespace ICSharpCode.WpfDesign.Designer.Services
/// <summary>
/// Gets/Sets whether the design surface should be grayed out while dragging/selection.
/// </summary>
public bool GrayOutDesignSurfaceExceptParentContainerWhenDragging = false;
public bool GrayOutDesignSurfaceExceptParentContainerWhenDragging = true;
}
}

Loading…
Cancel
Save