From 4181ca7888b9d544c12abb67046c445567b682cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 12 Jul 2021 08:27:08 +0200 Subject: [PATCH] dont use solidBackground=true on windows, Stack and Template cached by default --- Crow/Default.style | 7 +++---- Crow/src/Interface.cs | 19 ++++++++++++++----- Samples/ShowCase/ui/showcase.crow | 4 ++-- .../Interfaces/Experimental/allWidgets.crow | 2 +- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Crow/Default.style b/Crow/Default.style index 80131bce..8a6d3e6e 100644 --- a/Crow/Default.style +++ b/Crow/Default.style @@ -328,7 +328,6 @@ MessageBox, Popper, Slider, Spinner, TextBox, NumericControl { Margin="0"; BubbleMouseEvent="MouseWheel|Keyboard"; } - -//TemplatedControl, GenericStack { -// CacheEnabled="true"; -//} \ No newline at end of file +TemplatedControl, GenericStack { + CacheEnabled="true"; +} \ No newline at end of file diff --git a/Crow/src/Interface.cs b/Crow/src/Interface.cs index 44f0a786..dece83e2 100644 --- a/Crow/src/Interface.cs +++ b/Crow/src/Interface.cs @@ -1098,7 +1098,17 @@ namespace Crow ctx.Fill (); ctx.Operator = Operator.Over; } - public bool SolidBackground = true; + bool solidBackground = false; + public bool SolidBackground { + get => solidBackground; + set { + if (Environment.OSVersion.Platform == PlatformID.Unix) + solidBackground = value; + else + Debug.WriteLine ("SolidBackground property only available on unix."); + } + } + /// Clipping Rectangles drive the drawing process. For compositing, each object under a clip rectangle should be /// repainted. If it contains also clip rectangles, its cache will be update, or if not cached a full redraw will take place @@ -1992,10 +2002,9 @@ namespace Crow } public Rectangle ClientRectangle => clientRectangle; - public Interface HostContainer { - get { return this; } - } - public Rectangle getSlot () => ClientRectangle; + public Interface HostContainer => this; + + public Rectangle getSlot () => ClientRectangle; public void ChildrenLayoutingConstraints(ILayoutable layoutable, ref LayoutingType layoutType){ } #endregion } diff --git a/Samples/ShowCase/ui/showcase.crow b/Samples/ShowCase/ui/showcase.crow index 431745f9..409ddd9d 100644 --- a/Samples/ShowCase/ui/showcase.crow +++ b/Samples/ShowCase/ui/showcase.crow @@ -59,7 +59,7 @@ - + - +