]> O.S.I.I.S - jp/crow.git/commitdiff
remove clear from prepare ui frame for cairo, solve flickering in mt
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 18 Jul 2022 20:38:45 +0000 (22:38 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 18 Jul 2022 20:38:45 +0000 (22:38 +0200)
16 files changed:
Backends/CairoBackend/src/ImageBackend.cs
Backends/CairoBackend/src/Surface.cs
Crow/src/DebugUtils/DbgEvtType.cs [deleted file]
Crow/src/DebugUtils/DebugLogger.cs
Crow/src/Interface.cs
Crow/src/LayoutingQueueItem.cs
Crow/src/Widgets/ILayoutable.cs
Crow/src/Widgets/ScrollBar.cs
Crow/src/Widgets/Scroller.cs
Crow/src/Widgets/Widget.cs
Crow/src/Widgets/Window.cs
Directory.Build.props
Drawing2D/src/DbgEvtType.cs [new file with mode: 0644]
Samples/common/src/SampleBase.cs
Samples/common/ui/Interfaces/Experimental/randomProgress.crow
Samples/common/ui/Interfaces/Experimental/table.crow

index a90d275afa59583e9c23b7f945150b8f31796ff6..97b61e24e2b089834e46cd781fcb8c509ed1990b 100644 (file)
@@ -65,15 +65,22 @@ namespace Crow.CairoBackend
                {
                        IContext ctx = base.PrepareUIFrame (existingContext, clipping);
 
-                       clear (ctx);
+                       for (int i = 0; i < clipping.NumRectangles; i++)
+                               ctx.Rectangle (clipping.GetRectangle (i));
+                       ctx.Clip ();
+
                        ctx.PushGroup ();
 
                        return ctx;
                }
                public override void FlushUIFrame(IContext ctx)
                {
+                       //clear (ctx);
                        ctx.PopGroupToSource ();
+                       //ctx.Save();
+                       //ctx.Operator = Operator.Source;
                        ctx.Paint ();
+                       //ctx.Restore();
 
                        surf.Flush ();
 
index 1f44d3ab65ac5408ce3ee012b891229d2fbf1c0a..413384f036a523a197a38c6d31910b6b216e9e1e 100644 (file)
@@ -142,7 +142,7 @@ namespace Crow.CairoBackend {
                        handle = IntPtr.Zero;
                }
                public virtual void Resize (int width, int height) {
-                       
+                       throw new NotImplementedException();
                }
 
                public Status Finish ()
diff --git a/Crow/src/DebugUtils/DbgEvtType.cs b/Crow/src/DebugUtils/DbgEvtType.cs
deleted file mode 100644 (file)
index ed6bfea..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2013-2021  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
-//
-// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
-
-using System;
-
-namespace Crow
-{
-       [Flags]
-       public enum DbgEvtType : Int32 {
-               None                                                    = 0,
-               IFace                                                   = 0x00000100,
-               Widget                                                  = 0x00000200,
-
-               Warning                                                 = 0x00000400,
-               Error                                                   = 0x00000800,
-
-               Binding                                                 = 0x00001000,
-               Lock                                                    = 0x00002000,
-               Layouting                                               = 0x00004000,
-               Clipping                                                = 0x00008000,
-               Drawing                                                 = 0x00010000,
-
-               Focus                                                   = 0x00020000,
-               Override                                                = 0x00040000,
-               TemplatedGroup                                  = 0x00080000,
-               Dispose                                                 = 0x00100000,
-               Mouse                                                   = 0x00200000,
-               DragNDrop                                               = 0x00400000,
-
-               Update                                                  = IFace | 0x10000000,
-               ProcessLayouting                                = IFace | Update | Lock | Layouting,
-               ClippingRegistration                    = IFace | Update | Lock | Clipping,
-               ProcessDrawing                                  = IFace | Update | Lock | Drawing,
-               IFaceLoad                                               = IFace | 0x01,
-               IFaceInit                                               = IFace | 0x02,
-               CreateITor                                              = IFace | 0x03,
-               IFaceReloadTheme                                = IFace | 0x04,
-
-               HoverWidget                                             = Focus | Widget | 0x01,
-               FocusedWidget                                   = Focus | Widget | 0x02,
-               ActiveWidget                                    = Focus | Widget | 0x04,
-               UnfocusedWidget                                 = Focus | Widget | 0x08,
-
-               //10 nth bit set for graphic obj
-               GOClassCreation                                 = Widget | 0x01,
-               GOInitialization                                = Widget | 0x02,
-               GORegisterForGraphicUpdate              = Widget | 0x03,
-               GOEnqueueForRepaint                             = Widget | 0x04,
-               GONewDataSource                                 = Widget | 0x05,
-               GONewParent                                             = Widget | 0x06,
-               GONewLogicalParent                              = Widget | 0x07,
-               GOAddChild                                              = Widget | 0x08,
-
-               GOMeasure                                               = Widget | 0x09,
-               GOSearchLargestChild                    = Widget | 0x0A,
-               GOSearchTallestChild                    = Widget | 0x0B,
-               GORegisterForRedraw                             = Widget | 0x0C,
-               GOComputeChildrenPositions              = Widget | 0x0D,
-               GOOnChildLayoutChange                   = Widget | 0x0E,
-               GOAdjustStretchedGo                             = Widget | 0x0F,
-               GOSetProperty                                   = Widget | 0x10,
-
-               AlreadyDisposed                                 = Widget | Dispose | Error | 0x01,
-               DisposedByGC                                    = Widget | Dispose | Error | 0x02,
-               Disposing                                               = Widget | Dispose | 0x01,
-
-               GOClippingRegistration                  = Widget | Clipping | 0x01,
-               GORegisterClip                                  = Widget | Clipping | 0x02,
-               GOResetClip                                             = Widget | Clipping | 0x03,
-               GORegisterLayouting                     = Widget | Layouting | 0x01,
-               GOProcessLayouting                              = Widget | Layouting | 0x02,
-               GOProcessLayoutingWithNoParent  = Widget | Layouting | Warning | 0x01,
-               GODraw                                                  = Widget | Drawing | 0x01,
-               GORecreateCache                                 = Widget | Drawing | 0x02,
-               GOUpdateCache                                   = Widget | Drawing | 0x03,
-               GOPaintCache                                    = Widget | Drawing | 0x04,
-               GOPaint                                                 = Widget | Drawing | 0x05,
-               GOCreateSurface                                 = Widget | Drawing | 0x06,
-               GOCreateContext                                 = Widget | Drawing | 0x07,
-
-
-               GOLockUpdate                                    = Widget | Lock | 0x01,
-               GOLockClipping                                  = Widget | Lock | 0x02,
-               GOLockRender                                    = Widget | Lock | 0x03,
-               GOLockLayouting                                 = Widget | Lock | 0x04,
-
-               TGLoadingThread                                 = Widget | TemplatedGroup | 0x01,
-               TGCancelLoadingThread                   = Widget | TemplatedGroup | 0x02,
-
-               MouseDown                                               = IFace | Mouse | 0x01,
-               MouseUp                                                 = IFace | Mouse | 0x02,
-               MouseMove                                               = IFace | Mouse | 0x03,
-               MouseEnter                                              = Widget | Mouse | 0x01,
-               MouseLeave                                              = Widget | Mouse | 0x02,
-               WidgetMouseMove                                 = Widget | Mouse | 0x03,
-               WidgetMouseDown                                 = Widget | Mouse | 0x04,
-               WidgetMouseUp                                   = Widget | Mouse | 0x05,
-               WidgetMouseWheel                                = Widget | Mouse | 0x06,
-               WidgetMouseClick                                = Widget | Mouse | 0x07,
-               WidgetMouseDblClick                             = Widget | Mouse | 0x08,
-               Drag                                                    = Widget | DragNDrop | 0x01,
-               DragEnter                                               = Widget | DragNDrop | 0x02,
-               DragLeave                                               = Widget | DragNDrop | 0x03,
-               StartDrag                                               = Widget | DragNDrop | 0x04,
-               EndDrag                                                 = Widget | DragNDrop | 0x05,
-               Drop                                                    = Widget | DragNDrop | 0x06,
-
-               All = 0x7FFFFF00
-       }
-}
\ No newline at end of file
index d549e19d31962c8d7c8897c65215b146a0df488a..c859fef96dea8f2109c4ec5f9761e067a8882177 100644 (file)
@@ -15,9 +15,6 @@ namespace Crow
 {
        public static class DbgLogger
        {
-               /*public static DbgEvtType IncludeEvents = DbgEvtType.All;
-               public static DbgEvtType DiscardEvents = DbgEvtType.Focus;*/
-
                public static List<DbgEvtType> IncludedEvents = new List<DbgEvtType> ();
                public static bool ConsoleOutput = true;
 
index 507bed690ddfaede5cf093fd6a6acd391ef83c20..ca45a243b7521619ae2a62171fcbdb5fa8c16d37 100644 (file)
@@ -1293,7 +1293,7 @@ namespace Crow
 
                [Conditional ("DEBUG_HIGHLIGHT_FOCUS")]
                internal void debugRegisterClip (Widget w) {
-                       RegisterClip (w.ScreenCoordinates (w.Slot));
+                       RegisterChildClip (w.ScreenCoordinates (w.Slot));
                }
                [Conditional ("DEBUG_HIGHLIGHT_FOCUS")]
                void debugHighlightFocus (IContext ctx) {
@@ -1328,23 +1328,23 @@ namespace Crow
                                if (FocusedWidget is IEditableTextWidget lab) {
                                        if (lab.DrawCursor (ctx, out Rectangle c)) {
                                                if (textCursor != null && c != textCursor.Value)
-                                                       RegisterClip (textCursor.Value);
+                                                       RegisterChildClip (textCursor.Value);
                                                textCursor = c;
-                                               MainSurface.Flush ();
+                                               //MainSurface.Flush ();
                                        } else if (textCursor != null)
-                                               RegisterClip (textCursor.Value);
+                                               RegisterChildClip (textCursor.Value);
                                }
                                blinkingCursor.Restart ();
                                forceTextCursor = false;
                        } else if (textCursor != null && blinkingCursor.ElapsedMilliseconds > TEXT_CURSOR_BLINK_FREQUENCY) {
-                               RegisterClip (textCursor.Value);
+                               RegisterChildClip (textCursor.Value);
                                textCursor = null;
                                blinkingCursor.Restart ();
                        } else if (FocusedWidget is IEditableTextWidget lab) {
                                if (blinkingCursor.ElapsedMilliseconds > TEXT_CURSOR_BLINK_FREQUENCY) {
                                        if (lab.DrawCursor (ctx, out Rectangle c)) {
                                                textCursor = c;
-                                               MainSurface.Flush ();
+                                               //MainSurface.Flush ();
                                                blinkingCursor.Restart ();
                                        }
                                }
@@ -1384,7 +1384,7 @@ namespace Crow
                public void DeleteWidget(Widget g)
                {
                        lock (UpdateMutex) {
-                               RegisterClip (g.ScreenCoordinates (g.LastPaintedSlot));
+                               RegisterChildClip (g.ScreenCoordinates (g.LastPaintedSlot));
                                GraphicTree.Remove (g);
                                g.Parent = null;
                                g.Dispose ();
@@ -1400,7 +1400,7 @@ namespace Crow
 //                             }
 //                     }
                        lock (UpdateMutex) {
-                               RegisterClip (g.ScreenCoordinates (g.LastPaintedSlot));
+                               RegisterChildClip (g.ScreenCoordinates (g.LastPaintedSlot));
                                GraphicTree.Remove (g);
                                g.Parent = null;
                        }
@@ -1413,7 +1413,7 @@ namespace Crow
                                        //TODO:parent is not reset to null because object will be added
                                        //to ObjectToRedraw list, and without parent, it fails
                                        Widget g = GraphicTree [0];
-                                       RegisterClip (g.ScreenCoordinates (g.LastPaintedSlot));
+                                       RegisterChildClip (g.ScreenCoordinates (g.LastPaintedSlot));
                                        GraphicTree.RemoveAt (0);
                                        g.Dispose ();
                                }
@@ -1472,7 +1472,7 @@ namespace Crow
                        }
                }
 
-               protected void registerRefreshClientRectangle () => RegisterClip (clientRectangle);
+               protected void registerRefreshClientRectangle () => RegisterChildClip (clientRectangle);
 
                #region Mouse and Keyboard Handling
                MouseCursor cursor = MouseCursor.top_left_arrow;
@@ -2056,7 +2056,7 @@ namespace Crow
 
                #region ILayoutable implementation
                public virtual bool PointIsIn (ref Point m) => true;
-               public void RegisterClip (Rectangle r)
+               public void RegisterChildClip (Rectangle r)
                {
                        clipping.UnionRectangle (r);
                }
index 9ce5895bad934003035c7ddd7a876e97c4c15bab..f7606a6e1a761c87554ce372a1ce89a7a7d99459 100644 (file)
@@ -83,6 +83,16 @@ namespace Crow
                                }
 
                                try {
+                                       if (go.IsQueueForClipping) {
+                                               DbgLogger.AddEvent (DbgEvtType.GOProcessLayoutingWhileClipReg, this);
+#if DEBUG_LOG
+                                               result = Result.Discarded;
+#endif
+                                               LayoutingTries = 0;
+                                               DiscardCount++;
+                                               Layoutable.RegisteredLayoutings |= LayoutType;
+                                               go.IFace.DiscardQueue.Enqueue (this);
+                                       }
                                        if (go.Parent == null) {//TODO:improve this
                                                //cancel layouting for object without parent, maybe some were in queue when
                                                //removed from a listbox
index 6007f023710098d647090626acdab4bd2049eac4..0e71f056b4bd589162d7fc3551295b3aa46e1a9b 100644 (file)
@@ -25,7 +25,7 @@ namespace Crow
                LayoutingType RequiredLayoutings { get; set; }
                void ChildrenLayoutingConstraints(ILayoutable layoutable, ref LayoutingType layoutType);
                void RegisterForLayouting(LayoutingType layoutType);
-               void RegisterClip(Rectangle clip);
+               void RegisterChildClip(Rectangle clip);
                bool UpdateLayout(LayoutingType layoutType);
                bool PointIsIn(ref Point m);
 
index efbf3fb1ad99f3f0a61b2ec7cf11e27ac77a549d..99882590f4710c508103ee52091e3dce8eed38c5 100644 (file)
@@ -27,7 +27,7 @@ namespace Crow
                        set {
                                if (cursorRatio == value)
                                        return;
-                               if (double.IsFinite(value))
+                               if (double.IsFinite(value) && cursorRatio < 1.0)
                                        cursorRatio = value;
                                else
                                        cursorRatio = -1;
@@ -36,7 +36,7 @@ namespace Crow
         }
 
                void updateCursor () {
-                       if (cursorRatio < 0 || !double.IsFinite(cursorRatio))
+                       if (cursorRatio < 0 || !double.IsFinite(cursorRatio) || cursorRatio > 1.0)
                                return;
                        ILayoutable l = cursor?.Parent;
                        if (l == null)
index db563cb037ef7f3f8b79011a23b478e1631ceb48..a49420aa5f0eb838eaef3111324ce6978e006f8c 100644 (file)
@@ -174,9 +174,9 @@ namespace Crow
                        m += new Point (ScrollX, ScrollY);
                        return true;
                }
-               public override void RegisterClip (Rectangle clip)
+               public override void RegisterChildClip (Rectangle clip)
                {
-                       base.RegisterClip (clip - new Point(ScrollX,ScrollY));
+                       base.RegisterChildClip (clip - new Point(ScrollX,ScrollY));
                }
                public override void OnLayoutChanges (LayoutingType layoutType)
                {
index c3f08fd427d963268fdf889b68a64b325cf440c6..1165bb7e0f1a983dedee7558fae42f96b77ffe1c 100644 (file)
@@ -1527,8 +1527,8 @@ namespace Crow
 
                        parentRWLock.EnterReadLock ();
                        if (parent != null) {
-                               parent.RegisterClip (LastPaintedSlot);
-                               parent.RegisterClip (Slot);
+                               parent.RegisterChildClip (LastPaintedSlot);
+                               parent.RegisterChildClip (Slot);
                        }else {
                                DbgLogger.SetMsg (DbgEvtType.GOClippingRegistration, "clipping reg canceled (no parent)");
                        }
@@ -1540,7 +1540,7 @@ namespace Crow
                /// Add clip rectangle to this.clipping and propagate up to root
                /// </summary>
                /// <param name="clip">Clip rectangle</param>
-               public virtual void RegisterClip(Rectangle clip){
+               public virtual void RegisterChildClip(Rectangle clip){
                        if (disposed) {
                                DbgLogger.AddEvent (DbgEvtType.AlreadyDisposed | DbgEvtType.GORegisterClip, this);
                                return;
@@ -1573,7 +1573,7 @@ namespace Crow
                                        Console.WriteLine ($"parent.regclip canceled p.Dirty:{p?.IsDirty} Cached:{p?.CacheEnabled}: {this.ToString()}");
                                        return;
                                }*/
-                               Parent.RegisterClip (r + Slot.Position);
+                               Parent.RegisterChildClip (r + Slot.Position);
                        } finally {
                                DbgLogger.EndEvent (DbgEvtType.GORegisterClip);
                        }
@@ -2297,7 +2297,7 @@ namespace Crow
                        try
                        {
                                if (parent != null)
-                                       parent.RegisterClip (ContextCoordinates(LastPaintedSlot));
+                                       parent.RegisterChildClip (ContextCoordinates(LastPaintedSlot));
                        }
                        catch (System.Exception e)
                        {
index 168fb1010f9c7ba62c103232dad136d389d01cc0..cc7763c922120e56c34d6e8114cba2688be7815e 100644 (file)
@@ -500,7 +500,7 @@ namespace Crow
                                lock (IFace.UpdateMutex) {
                                        Widget p = Parent as Widget;
                                        if (p is Group g) {
-                                                       RegisterClip (p.ScreenCoordinates (p.LastPaintedSlot));
+                                                       RegisterChildClip (p.ScreenCoordinates (p.LastPaintedSlot));
                                                        g.DeleteChild (this);
                                                //(Parent as Group).RegisterForRedraw ();
                                        } else if (Parent is Container c)
index 37361807d6c600662bd2152cb5768aebe6194943..d674fd6ea391adc003747c43d045db4129690b50 100644 (file)
@@ -15,7 +15,7 @@
 
                <!-- Compile with logging enabled, this will slow down apps, use this only
                         for debugging purpose-->
-               <CrowDebugLogEnabled>true</CrowDebugLogEnabled>
+               <CrowDebugLogEnabled>false</CrowDebugLogEnabled>
 
                <!-- Collect several statistics on widgets-->
                <CrowDebugStatsEnabled>false</CrowDebugStatsEnabled>
diff --git a/Drawing2D/src/DbgEvtType.cs b/Drawing2D/src/DbgEvtType.cs
new file mode 100644 (file)
index 0000000..ff214ec
--- /dev/null
@@ -0,0 +1,112 @@
+// Copyright (c) 2013-2021  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
+using System;
+
+namespace Crow
+{
+       [Flags]
+       public enum DbgEvtType : Int32 {
+               None                                                    = 0,
+               IFace                                                   = 0x00000100,
+               Widget                                                  = 0x00000200,
+
+               Warning                                                 = 0x00000400,
+               Error                                                   = 0x00000800,
+
+               Binding                                                 = 0x00001000,
+               Lock                                                    = 0x00002000,
+               Layouting                                               = 0x00004000,
+               Clipping                                                = 0x00008000,
+               Drawing                                                 = 0x00010000,
+
+               Focus                                                   = 0x00020000,
+               Override                                                = 0x00040000,
+               TemplatedGroup                                  = 0x00080000,
+               Dispose                                                 = 0x00100000,
+               Mouse                                                   = 0x00200000,
+               DragNDrop                                               = 0x00400000,
+
+               Update                                                  = IFace | 0x10000000,
+               ProcessLayouting                                = IFace | Update | Lock | Layouting,
+               ClippingRegistration                    = IFace | Update | Lock | Clipping,
+               ProcessDrawing                                  = IFace | Update | Lock | Drawing,
+               IFaceLoad                                               = IFace | 0x01,
+               IFaceInit                                               = IFace | 0x02,
+               CreateITor                                              = IFace | 0x03,
+               IFaceReloadTheme                                = IFace | 0x04,
+
+               HoverWidget                                             = Focus | Widget | 0x01,
+               FocusedWidget                                   = Focus | Widget | 0x02,
+               ActiveWidget                                    = Focus | Widget | 0x04,
+               UnfocusedWidget                                 = Focus | Widget | 0x08,
+
+               //10 nth bit set for graphic obj
+               GOClassCreation                                 = Widget | 0x01,
+               GOInitialization                                = Widget | 0x02,
+               GORegisterForGraphicUpdate              = Widget | 0x03,
+               GOEnqueueForRepaint                             = Widget | 0x04,
+               GONewDataSource                                 = Widget | 0x05,
+               GONewParent                                             = Widget | 0x06,
+               GONewLogicalParent                              = Widget | 0x07,
+               GOAddChild                                              = Widget | 0x08,
+
+               GOMeasure                                               = Widget | 0x09,
+               GOSearchLargestChild                    = Widget | 0x0A,
+               GOSearchTallestChild                    = Widget | 0x0B,
+               GORegisterForRedraw                             = Widget | 0x0C,
+               GOComputeChildrenPositions              = Widget | 0x0D,
+               GOOnChildLayoutChange                   = Widget | 0x0E,
+               GOAdjustStretchedGo                             = Widget | 0x0F,
+               GOSetProperty                                   = Widget | 0x10,
+
+               AlreadyDisposed                                 = Widget | Dispose | Error | 0x01,
+               DisposedByGC                                    = Widget | Dispose | Error | 0x02,
+               Disposing                                               = Widget | Dispose | 0x01,
+
+               GOClippingRegistration                  = Widget | Clipping | 0x01,
+               GORegisterClip                                  = Widget | Clipping | 0x02,
+               GOResetClip                                             = Widget | Clipping | 0x03,
+               GORegisterLayouting                     = Widget | Layouting | 0x01,
+               GOProcessLayouting                              = Widget | Layouting | 0x02,
+               GOProcessLayoutingWithNoParent  = Widget | Layouting | Warning | 0x01,
+               GOProcessLayoutingWhileClipReg  = Widget | Layouting | Warning | 0x02,
+               GODraw                                                  = Widget | Drawing | 0x01,
+               GORecreateCache                                 = Widget | Drawing | 0x02,
+               GOUpdateCache                                   = Widget | Drawing | 0x03,
+               GOPaintCache                                    = Widget | Drawing | 0x04,
+               GOPaint                                                 = Widget | Drawing | 0x05,
+               GOCreateSurface                                 = Widget | Drawing | 0x06,
+               GOCreateContext                                 = Widget | Drawing | 0x07,
+
+
+               GOLockUpdate                                    = Widget | Lock | 0x01,
+               GOLockClipping                                  = Widget | Lock | 0x02,
+               GOLockRender                                    = Widget | Lock | 0x03,
+               GOLockLayouting                                 = Widget | Lock | 0x04,
+
+               TGLoadingThread                                 = Widget | TemplatedGroup | 0x01,
+               TGCancelLoadingThread                   = Widget | TemplatedGroup | 0x02,
+
+               MouseDown                                               = IFace | Mouse | 0x01,
+               MouseUp                                                 = IFace | Mouse | 0x02,
+               MouseMove                                               = IFace | Mouse | 0x03,
+               MouseEnter                                              = Widget | Mouse | 0x01,
+               MouseLeave                                              = Widget | Mouse | 0x02,
+               WidgetMouseMove                                 = Widget | Mouse | 0x03,
+               WidgetMouseDown                                 = Widget | Mouse | 0x04,
+               WidgetMouseUp                                   = Widget | Mouse | 0x05,
+               WidgetMouseWheel                                = Widget | Mouse | 0x06,
+               WidgetMouseClick                                = Widget | Mouse | 0x07,
+               WidgetMouseDblClick                             = Widget | Mouse | 0x08,
+               Drag                                                    = Widget | DragNDrop | 0x01,
+               DragEnter                                               = Widget | DragNDrop | 0x02,
+               DragLeave                                               = Widget | DragNDrop | 0x03,
+               StartDrag                                               = Widget | DragNDrop | 0x04,
+               EndDrag                                                 = Widget | DragNDrop | 0x05,
+               Drop                                                    = Widget | DragNDrop | 0x06,
+
+               All = 0x7FFFFF00
+       }
+}
\ No newline at end of file
index e469016c24fb77559db30c9e4ed82b85cc20eb8d..2ae28cb50626bdd3a117f42acd77b829e188d903 100644 (file)
@@ -19,7 +19,7 @@ namespace Samples
        public class SampleBase : Interface
        {
                public SampleBase(IntPtr hWin) : base(800, 600, hWin) { }
-               public SampleBase() : base (800, 600, true) { }
+               public SampleBase() : base (800, 600, false) { }
 
                public Version CrowVersion => Assembly.GetAssembly(typeof(Widget)).GetName().Version;
 
index 9b63b81ab0731d14527cd96225d8d8ffdc97fa19..ae78a76a0284bc36af0bf12d1ad469b5febf5faf 100644 (file)
@@ -2,10 +2,9 @@
        <VerticalStack Width="Fit" Background="DarkSlateGrey" Margin="10" Height="Fit">
                <HorizontalStack Height="Fit" Spacing="10">
                        <Label Text="Value:"/>
-                       <Label Text="{../../slider.Value}" Background="Onyx" Margin="1" Width="40" TextAlignment="Right"/>
+                       <Spinner Name="slider" Width="100" Background="DarkGrey" LargeIncrement="20" SmallIncrement="5"
+                               Minimum="10" Maximum="1000" Value="{²RandomProgressItemCount}"/>
                </HorizontalStack>
-               <Slider Name="slider" Height="10" Width="200" Background="DarkGrey" LargeIncrement="20" SmallIncrement="5"
-                       Minimum="10" Maximum="1000" Value="{²RandomProgressItemCount}"/>
        </VerticalStack>
        <ListBox UseLoadingThread="false" Data="{RandomProgressList}">
                <Template>
index b80ee378d3f36e66c139a6f65cc0f64b211504a4..5322266451d0f3855e36050e0a55a4cd2cb250b7 100644 (file)
@@ -1,6 +1,6 @@
 <Table Columns="test,Fit;test,Fit;test,Stretched;test,Fit" Margin="10" 
        ColumnSpacing="5" Spacing="5" 
-       Foreground="Red"
+       Foreground="Grey"
        RowsMargin="0"
        BorderLineWidth="0"
        VerticalLineWidth="1"