From e56fb3c567aad956a19bd9f2757c35c26601740f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Thu, 22 Mar 2018 00:47:55 +0100 Subject: [PATCH] get iface through parenting to prevent queuing out of tree widgets --- CrowIDE/src/Editors/ImlVisualEditor.cs | 4 +- CrowIDE/src/GraphicObjectDesignContainer.cs | 4 +- CrowIDE/ui/editors/IMLEdit.itemp | 4 - Tests/BasicTests.cs | 4 +- Tests/Interfaces/Divers/welcome.crow | 4 +- src/BmpPicture.cs | 15 +-- src/GraphicObjects/GraphicObject.cs | 105 ++++++++++---------- src/GraphicObjects/ILayoutable.cs | 2 + src/GraphicObjects/IMLContainer.cs | 32 +++++- src/GraphicObjects/Image.cs | 57 +++++------ src/GraphicObjects/MessageBox.cs | 4 +- src/GraphicObjects/Popper.cs | 4 +- src/GraphicObjects/ProgressBar.cs | 5 +- src/GraphicObjects/Slider.cs | 6 +- src/GraphicObjects/TabItem.cs | 6 +- src/GraphicObjects/TemplatedContainer.cs | 4 +- src/GraphicObjects/TemplatedControl.cs | 26 ++--- src/GraphicObjects/TemplatedGroup.cs | 4 +- src/GraphicObjects/Window.cs | 6 +- src/IML/IMLContext.cs | 2 +- src/Instantiator.cs | 11 +- src/Interface.cs | 7 +- src/Picture.cs | 2 +- src/SvgPicture.cs | 30 +++--- 24 files changed, 195 insertions(+), 153 deletions(-) diff --git a/CrowIDE/src/Editors/ImlVisualEditor.cs b/CrowIDE/src/Editors/ImlVisualEditor.cs index 11f94c17..3c5ecc67 100644 --- a/CrowIDE/src/Editors/ImlVisualEditor.cs +++ b/CrowIDE/src/Editors/ImlVisualEditor.cs @@ -72,8 +72,8 @@ namespace Crow.Coding } void initIcons () { - icoMove = new SvgPicture (); - icoMove.Load (IFace, "#Crow.Coding.icons.move-arrows.svg"); + icoMove = new SvgPicture ("#Crow.Coding.icons.move-arrows.svg"); + icoMove.Load (IFace); // icoStyle = new SvgPicture (); // icoStyle.Load (IFace, "#Crow.Coding.icons.palette.svg"); } diff --git a/CrowIDE/src/GraphicObjectDesignContainer.cs b/CrowIDE/src/GraphicObjectDesignContainer.cs index 4540898b..e2e1ac8d 100644 --- a/CrowIDE/src/GraphicObjectDesignContainer.cs +++ b/CrowIDE/src/GraphicObjectDesignContainer.cs @@ -53,8 +53,8 @@ namespace Crow.Coding lock (go.IFace.UpdateMutex) { go.IFace.DragImageHeight = dragIconSize; go.IFace.DragImageWidth = dragIconSize; - SvgPicture pic = new SvgPicture (); - pic.Load (go.IFace, IconPath); + SvgPicture pic = new SvgPicture (IconPath); + pic.Load (go.IFace); ImageSurface img = new ImageSurface (Format.Argb32, dragIconSize, dragIconSize); using (Context ctx = new Context (img)) { Rectangle r = new Rectangle (0, 0, dragIconSize, dragIconSize); diff --git a/CrowIDE/ui/editors/IMLEdit.itemp b/CrowIDE/ui/editors/IMLEdit.itemp index 84f391cf..6ea1391f 100644 --- a/CrowIDE/ui/editors/IMLEdit.itemp +++ b/CrowIDE/ui/editors/IMLEdit.itemp @@ -44,9 +44,5 @@ - diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs index af624ee5..6883360d 100644 --- a/Tests/BasicTests.cs +++ b/Tests/BasicTests.cs @@ -194,8 +194,10 @@ namespace Tests this.KeyDown += KeyboardKeyDown1; //testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" }; - testFiles = new string [] { @"Interfaces/Divers/welcome.crow" }; + //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" }; //testFiles = new string [] { @"Interfaces/Divers/0.crow" }; + //testFiles = new string [] { @"Interfaces/Divers/testIMLContainer.crow" }; + testFiles = new string [] { @"Interfaces/TemplatedContainer/testTabView.crow" }; //testFiles = new string [] { @"Interfaces/TemplatedContainer/testTreeView.crow" }; //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" }; // testFiles = new string[] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" }; diff --git a/Tests/Interfaces/Divers/welcome.crow b/Tests/Interfaces/Divers/welcome.crow index b65a4553..8db6dc65 100644 --- a/Tests/Interfaces/Divers/welcome.crow +++ b/Tests/Interfaces/Divers/welcome.crow @@ -4,4 +4,6 @@