]> O.S.I.I.S - jp/crow.git/commitdiff
dont use solidBackground=true on windows, Stack and Template cached by default
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 12 Jul 2021 06:27:08 +0000 (08:27 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 12 Jul 2021 06:27:08 +0000 (08:27 +0200)
Crow/Default.style
Crow/src/Interface.cs
Samples/ShowCase/ui/showcase.crow
Samples/common/ui/Interfaces/Experimental/allWidgets.crow

index 80131bce3d5df67a2c9b1d3c3204c347368f1996..8a6d3e6e0cdb220f966825b585f997e3fd9b1bc1 100644 (file)
@@ -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
index 44f0a7861c8362105b1cdbc485bcf42fb95ce5cd..dece83e2ee4c5ae7e23ecefc23f3f02393b50613 100644 (file)
@@ -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
        }
index 431745f9a51770934b944d50dda0d49e9c21005b..409ddd9d9472064a7f845fd296d4a7b096b366cb 100644 (file)
@@ -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}" />
index 4b659db803dbcd37726c331bf4d92aa43a31067c..c329731e9d25f871db8358d88ebf5f3ff9e66004 100644 (file)
@@ -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/>