]> O.S.I.I.S - jp/crow.git/commitdiff
first test with docker in CrowIDE
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 5 Mar 2018 07:46:03 +0000 (08:46 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 5 Mar 2018 07:46:03 +0000 (08:46 +0100)
Default.style
Templates/DockWindow.template
src/GraphicObjects/DockStack.cs
src/GraphicObjects/Docker.cs
src/GraphicObjects/Splitter.cs

index d4e7e4a7674994cb09ef4e0fc9be595cabf06f43..3911bafa8484bf5ab59ac8bf0f6de0130d201734 100644 (file)
@@ -73,7 +73,7 @@ Slider {
 }
 Splitter {
        Focusable = "true";
-       Margin = "2";
+       Margin = "1";
        Background = "Gray";
 }
 Spinner {
@@ -111,11 +111,11 @@ ToolWindow {
 }
 Docker {
        AllowDrop = "false";
-       Margin="1";
+       Margin="0";
        Focusable="true";
 }
 DockStack {
-       Margin="3";
+       Margin="1";
        AllowDrop = "true";
        Focusable="true";
        //DragEnter="{Background=Blue}";
@@ -125,6 +125,7 @@ DockStack {
 DockWindow {
        Focusable = "true";
        AllowDrag = "true";
+       Margin="0";
 }
 FileDialog {
        Template = "#Crow.FileDialog.template";
index 62facf06e304dcf72cf0365f8b73e5d5d709910a..3e5b499adecc306530e2fa2fd6afee1582c59cc6 100755 (executable)
@@ -6,17 +6,17 @@
                                MouseLeave="./onBorderMouseLeave">
        <VerticalStack Spacing="0">
                <HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
-                               Name="hs" Margin="2" Spacing="0" Height="Fit">
+                               Name="hs" Margin="0" Spacing="0" Height="Fit">
                        <GraphicObject Width="5"/>
-                       <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                       <Image Margin="1" Width="10" Height="10" Path="{./Icon}"/>
                        <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
-                       <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                       <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="10" Width="10"
                                MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
                                <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
                                         MouseClick="./butQuitPress"/>
                        </Border>
                        <GraphicObject Width="5"/>
                </HorizontalStack>
-               <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
+               <Container Name="Content" MinimumSize="50,50"/>
        </VerticalStack>
 </Border>
index 79643b4758461404bf0f2f5d65f1f19bb4c7c72d..c06be42a58bbce86111667208138ee67dfea340d 100644 (file)
@@ -29,10 +29,8 @@ using Crow.IML;
 namespace Crow
 {
        public class DockStack : GenericStack
-       {
-               internal static Instantiator instStack, instSplit;//, instSpacer;
-
-               int dockingDiv = 5;
+       {               
+               int dockingDiv = 6;
                GraphicObject subStack = null;
 
                Docker rootDock { get { return LogicalParent as Docker; }}
@@ -47,14 +45,6 @@ namespace Crow
                public DockStack (Interface iface) : base (iface) {}
                #endregion
 
-               protected override void onInitialized (object sender, EventArgs e)
-               {
-                       base.onInitialized (sender, e);
-                       instStack = IFace.CreateITorFromIMLFragment (@"<DockStack/>");
-                       instSplit = IFace.CreateITorFromIMLFragment (@"<Splitter/>");
-                       //instSpacer = IFace.CreateITorFromIMLFragment (@"<GraphicObject Background='Transparent' IsEnabled='false'/>");
-               }
-
                public override void AddChild (GraphicObject g)
                {
                        base.AddChild (g);
@@ -236,8 +226,7 @@ namespace Crow
                        dsp.SubStack = SubStack;
                        return;
                }
-               public void Dock(DockWindow dw){
-                       Splitter splitter = instSplit.CreateInstance<Splitter> ();
+               public void Dock(DockWindow dw){                        
                        Rectangle r = ClientRectangle;
 
                        int vTreshold = r.Height / dockingDiv;
@@ -249,7 +238,7 @@ namespace Crow
                                activeStack = this;
                                Orientation = dw.DockingPosition.GetOrientation ();
                        }else if (dw.DockingPosition.GetOrientation() != Orientation) {                         
-                               activeStack = instStack.CreateInstance<DockStack> ();
+                               activeStack = new DockStack (IFace);
                                int ci = Children.IndexOf (rootDock.CenterDockedObj);
                                if (ci  <0 ){
                                        DockStack dsp = Parent as DockStack;
@@ -284,24 +273,24 @@ namespace Crow
                                dw.Height = vTreshold;
                                dw.Width = Measure.Stretched;
                                activeStack.InsertChild (0, dw);
-                               activeStack.InsertChild (1, splitter);
+                               activeStack.InsertChild (1, new Splitter(IFace));
                                break;
                        case Alignment.Bottom:
                                dw.Height = vTreshold;
                                dw.Width = Measure.Stretched;
-                               activeStack.AddChild (splitter);
+                               activeStack.AddChild (new Splitter(IFace));
                                activeStack.AddChild (dw);
                                break;
                        case Alignment.Left:
                                dw.Width = hTreshold;
                                dw.Height = Measure.Stretched;
                                activeStack.InsertChild (0, dw);
-                               activeStack.InsertChild (1, splitter);
+                               activeStack.InsertChild (1, new Splitter(IFace));
                                break;
                        case Alignment.Right:
                                dw.Width = hTreshold;
                                dw.Height = Measure.Stretched;
-                               activeStack.AddChild (splitter);
+                               activeStack.AddChild (new Splitter(IFace));
                                activeStack.AddChild (dw);
                                break;
                        case Alignment.Center:
index 3803d8dd4891081383d799ce42cf13856a84af99..6c55e34eae9645a7e42d3010d2c83f610789cbc1 100644 (file)
@@ -71,9 +71,9 @@ namespace Crow
                }
                public override void RemoveChild (GraphicObject child)
                {
-                       lock (IFace.UpdateMutex) {
-                               RegisterClip (ScreenCoordinates (LastPaintedSlot));
-                       }
+//                     lock (IFace.UpdateMutex) {
+//                             RegisterClip (ScreenCoordinates (LastPaintedSlot));
+//                     }
                        base.RemoveChild (child);
                }
 
index e8aa60f80fc5a2db46e566feeb29069c33d5f1d1..59a70d25d156e55527832fe8efefa8f1b47b9848 100644 (file)
@@ -43,7 +43,7 @@ namespace Crow
 
                int thickness;
 
-               [XmlAttributeAttribute][DefaultValue(1)]
+               [XmlAttributeAttribute][DefaultValue(3)]
                public virtual int Thickness {
                        get { return thickness; }
                        set {