aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-07-12 08:27:08 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-07-12 08:27:08 +0200
commit4181ca7888b9d544c12abb67046c445567b682cf (patch)
tree966bd3bbf67c065dbf7182df07a171acaf9dfe61
parent5c91d515f8e05171ff94323c49831f080a11adec (diff)
dont use solidBackground=true on windows, Stack and Template cached by default
-rw-r--r--Crow/Default.style7
-rw-r--r--Crow/src/Interface.cs19
-rw-r--r--Samples/ShowCase/ui/showcase.crow4
-rw-r--r--Samples/common/ui/Interfaces/Experimental/allWidgets.crow2
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.");
+ }
+ }
+
/// <summary>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</summary>
@@ -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 @@
</DirectoryView>
</VerticalStack>
<Splitter Width="6" />
- <VerticalStack>
+ <VerticalStack CacheEnabled="true">
<!--<VerticalStack Name="Watches" Background="Black" Height="Fit" Width="Stretched">
<HorizontalStack Height="Fit">
<Label Style="smallLabel" Text="hover:" Width="50"/>
@@ -76,7 +76,7 @@
</VerticalStack>-->
<Container Name="CrowContainer" Height="60%" Background="Black"/>
<Splitter/>
- <VerticalStack>
+ <VerticalStack CacheEnabled="true">
<HorizontalStack Height="Fit">
<Button Style="IcoButton" Command="{CMDNew}" />
<Button Style="IcoButton" Command="{CMDSave}" />
diff --git a/Samples/common/ui/Interfaces/Experimental/allWidgets.crow b/Samples/common/ui/Interfaces/Experimental/allWidgets.crow
index 4b659db8..c329731e 100644
--- a/Samples/common/ui/Interfaces/Experimental/allWidgets.crow
+++ b/Samples/common/ui/Interfaces/Experimental/allWidgets.crow
@@ -1,5 +1,5 @@
<TabView Background="DimGrey">
- <VerticalStack Name="Base" Background="Black" Margin="1" >
+ <VerticalStack Name="Base" Background="Black" Margin="1" CacheEnabled="true" >
<HorizontalStack >
<GroupBox Style="allWidgetCell" Caption="Label" >
<Label/>