]> O.S.I.I.S - jp/crow.git/commitdiff
focus and windows move and size handles
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sat, 13 Jun 2020 06:21:47 +0000 (08:21 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sat, 13 Jun 2020 06:21:47 +0000 (08:21 +0200)
23 files changed:
Crow/Default.style
Crow/Templates/CheckBox.template
Crow/Templates/MessageBox.template
Crow/Templates/RadioButton.template
Crow/Templates/ToolWindow.template
Crow/Templates/Window.template
Crow/src/Command.cs
Crow/src/IML/Node.cs
Crow/src/IML/NodeStack.cs
Crow/src/Interface.cs
Crow/src/Widgets/CheckBox.cs
Crow/src/Widgets/Label.cs
Crow/src/Widgets/MessageBox.cs
Crow/src/Widgets/Slider.cs
Crow/src/Widgets/Splitter.cs
Crow/src/Widgets/TextBox.cs
Crow/src/Widgets/Widget.cs
Crow/src/Widgets/Window.cs
Samples/HelloWorld/ui/helloworld.crow
Samples/ShowCase/ui/focused.crow [new file with mode: 0644]
Samples/ShowCase/ui/helloworld.crow [deleted file]
Samples/ShowCase/ui/showcase.crow
Samples/common/ui/Interfaces/Divers/testSlider.crow

index 773b1eebe84fbd91a798f3dd7be1f1f13490576f..3d5c3e7ffd5295fb2b1211b1c15acfffaed0e355 100644 (file)
@@ -5,10 +5,17 @@ ControlCaptionColor = "LightGrey";
 ControlCaptionHoverColor = "White";
 ControlCornerRadius = "0";
 ControlInsideMargin = "1";
+ControlHighlight = "RoyalBlue";
 IconSize = "11";
 IconMargin = "1";
 ToggleIconSize = "16";
 
+WindowBackgroundColor = "";
+WindowBorderColor = "Grey";
+WindowBorderWidth = "1";
+WindowTitleBarBackground = "vgradient|0:Onyx|1:SteelBlue";
+WindowTitleBarForeground = "White";
+
 Button, CheckBox, RadioButton, ComboBox, Expandable,
 MessageBox, Popper, Slider, Spinner, TextBox {
        Focusable = "true";
@@ -76,28 +83,26 @@ Menu {
        Height = "Fit";
        Width = "Stretched";
        VerticalAlignment = "Top";
-       SelectionBackground = "Transparent";
+       SelectionBackground = "${ControlHighlight}";
 }
 MenuItem {
        Caption = "MenuItem";
        Width = "Stretched";
        Height = "Fit";
-       //Background = "vgradient|0:DimGrey|1:Black";
-       //Background = "Transparent";
+       Background = "DimGrey"; 
        Foreground = "LightGrey";
-       MouseEnter = "{Background=SteelBlue;}";
-       MouseLeave = "{Background=Transparent;}";
-       //MouseEnter = "{Background = vgradient|0:SteelBlue|1:Jet;Foreground=White;}";
-       //MouseLeave = "{Foreground=LightGrey;Background=Transparent;}";
-       SelectionBackground = "Transparent";
+       MouseEnter = "{Background=${ControlHighlight}}";
+       MouseLeave = "{Background=Transparent}";
+       SelectionBackground = "${ControlHighlight}";
 }
 MessageBox {
-       Background = "0.1,0.1,0.2,0.7";
+       Background = "0.1,0.1,0.2,0.85";
        Width = "Fit";
        Caption="MessageBox";
        Font = "serif, 12";
-       MinimumSize = "200,120";
+       //MinimumSize = "200,120";
        AlwaysOnTop = "true";
+       Resizable = "false";
 }
 Slider {
        Foreground = "Grey";
@@ -129,6 +134,12 @@ Window {
        Width = "150";
        Height = "150";
 }
+winBorder {
+       BorderWidth = "${WindowBorderWidth}";
+       Foreground = "${WindowBorderColor}";
+       Background = "${WindowBackgroundColor}";        
+       Margin = "0";   
+}
 WindowIconBorder {
        BorderWidth="1";
        Foreground="Transparent";
@@ -228,12 +239,12 @@ ArrowBut {
 
 ScrollBar {
        Orientation = "Vertical";
-    Maximum = "0";
-    Value = "0";
-    Foreground="Transparent";
-    Background="Onyx";
-    Width = "14";    
-    CornerRadius = "0";
+       Maximum = "0";
+       Value = "0";
+       Foreground="Transparent";
+       Background="Onyx";
+       Width = "14";    
+       CornerRadius = "0";
 }
 HScrollBar {
     Template = "#Crow.HScrollBar.template";
index 9e2a568f4fe7cd7d239190def4fa593f2023041c..3124768150cae7c02b6fba5d97a7698261e807d0 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<HorizontalStack Style="Control" Background="{./Background}">
+<HorizontalStack Style="Control" Background="{./Background}" CornerRadius="{$ControlCornerRadius}">
        <Image Style="Icon" Width="${ToggleIconSize}" Height="${ToggleIconSize}" Path="#Crow.Icons.checkbox.svg" SvgSub="{./IsChecked}"/>
        <Label Style="ControlCaption" Font="{./Font}" Text="{./Caption}" Foreground="{./Foreground}"/>
 </HorizontalStack>
\ No newline at end of file
index 385bf8243df6fca40b36ae75699025e57ac94368..8a3ea804acacc047b78571fa4b74fc6776b219c0 100644 (file)
@@ -1,22 +1,18 @@
 <?xml version="1.0"?>
-<Border        CornerRadius="0"
-                               MouseEnter="./onBorderMouseEnter"
-                               MouseLeave="./onBorderMouseLeave">
-       <VerticalStack Background="{./Background}">
-               <Border BorderWidth="0" Foreground="White" Height="Fit" Width="Stretched" MinimumSize="200,0"
-                               Background="{./TitleBarBackground}">
-                       <HorizontalStack Name="hs" Margin="2" Spacing="1" Height="Fit" >
-                               <Widget Width="5" Height="5"/>
-                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
-                               <Label Width="Stretched" Foreground="{./TitleBarForeground}" Margin="1" TextAlignment="Center" Text="{./Caption}" />
-                               <Border CornerRadius="3" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
-                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
-                                       <Image Focusable="true" Name="Image" Path="#Crow.Icons.exit2.svg"
-                                                MouseClick="./butQuitPress"/>
-                               </Border>
-                               <Widget Width="5" Height="5"/>
-                       </HorizontalStack>
-               </Border>
+<Border Name="SizeHandle"      Style="winBorder"  CornerRadius="{./CornerRadius}" Background="{./Background}">
+       <VerticalStack Spacing="0">
+               <HorizontalStack Background="${WindowTitleBarBackground}"
+                               Name="hs" Margin="2" Spacing="1" Height="Fit" Width="Stretched" >
+                       <Widget Width="5" />
+                       <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                       <Label Name="MoveHandle" Width="Stretched" Foreground="${WindowTitleBarForeground" Margin="2" TextAlignment="Center" Text="{./Caption}" />
+                       <Border CornerRadius="3" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                               MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                               <Image Focusable="true" Name="Image" Path="#Crow.Icons.exit2.svg"
+                                        MouseClick="./butQuitPress"/>
+                       </Border>
+                       <Widget Width="5" />
+               </HorizontalStack>      
                <HorizontalStack Margin="5" >
                        <Image Name="Image" Width="50" Height="30" Path="{./MsgIcon}" />
                        <Label Margin="5" Font="{./Font}" Text="{./Message}"                            
index 97ab3d96aa5c498813a3b5daf6b62cd47b14b52f..dc237d99de076ae97e8bafd708ddcf9f0fe0b70d 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<HorizontalStack Style="Control" Background="{./Background}">
+<HorizontalStack Style="Control" Background="{./Background}" CornerRadius="${ControlCornerRadius}">
        <Image Style="Icon"  Width="${ToggleIconSize}" Height="${ToggleIconSize}" Path="#Crow.Icons.radiobutton.svg" SvgSub="{./IsChecked}"/>
        <Label Style="ControlCaption" Font="{./Font}" Text="{./Caption}" Foreground="{./Foreground}"/>
 </HorizontalStack>
\ No newline at end of file
index bad53fea415490017f8b9bb74351b0cb24a619b9..7840fb301e9a93456171da9f030bd7c2b3e7f213 100644 (file)
@@ -1,11 +1,7 @@
 <?xml version="1.0"?>
 <Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
-                               Background="{./Background}"
-                               MouseEnter="./onBorderMouseEnter"
-                               MouseLeave="./onBorderMouseLeave">
+                               Background="{./Background}">
        <VerticalStack Spacing="0">
-<!--           <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
-                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">-->
                        <HorizontalStack Background="{./TitleBarBackground}" Width="Stretched"
                                        Name="hs" Margin="2" Spacing="0" Height="Fit">
                                <Widget Width="5"/>
@@ -18,7 +14,6 @@
                                </Border>
                                <Widget Width="5"/>
                        </HorizontalStack>
-<!--           </Border>-->
                <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
        </VerticalStack>
 </Border>
index a47a0e30a079bd582c6180b217baa420629b42c5..dee91bcd41403fe8233828e241bcbfe880d76d20 100644 (file)
@@ -1,12 +1,10 @@
 <?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="Grey" CornerRadius="{./CornerRadius}"
-                               Background="{./Background}">
+<Border Name="SizeHandle" Style="winBorder"  CornerRadius="{./CornerRadius}" Background="{./Background}" >
        <VerticalStack Spacing="0">
-               <HorizontalStack Background="{./TitleBarBackground}"
-                               Name="hs" Margin="0" Spacing="0" Height="Fit">
+               <HorizontalStack Background="${WindowTitleBarBackground}" Margin="0" Spacing="0" Height="Fit">
                        <Widget Width="5"/>
                        <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
-                       <Label Width="Stretched" Foreground="{./TitleBarForeground}" Margin="2" TextAlignment="Center" Text="{./Caption}" />
+                       <Label Name="MoveHandle" Width="Stretched" Foreground="${WindowTitleBarForeground" Margin="2" TextAlignment="Center" Text="{./Caption}" />
                        <Border Visible="{./ShowMinimize}" Style="WindowIconBorder">
                                <Image Focusable="true" Path="#Crow.Icons.minimize.svg"
                                         MouseClick="./onMinimized"/>
index 940b7f4878d59a954d67c117cc298df49506460c..b2c587f92c707da79e6373e008726a06515fd8a0 100644 (file)
@@ -6,6 +6,40 @@ using System;
 using System.ComponentModel;
 
 namespace Crow {
+       public class CommandGroup : ObservableList<Command>, IValueChange
+       {
+               string caption;
+               string icon;
+
+               /// <summary>
+               /// label to display in the bound control
+               /// </summary>
+               [DefaultValue ("Unamed Command Group")]
+               public virtual string Caption {
+                       get { return caption; }
+                       set {
+                               if (caption == value)
+                                       return;
+                               caption = value;
+                               NotifyValueChanged ("Caption", caption);
+
+                       }
+               }
+               /// <summary>
+               /// Icon to display in the bound control
+               /// </summary>          
+               public string Icon {
+                       get { return icon; }
+                       set {
+                               if (icon == value)
+                                       return;
+                               icon = value;
+                               NotifyValueChanged ("Icon", icon);
+                       }
+               }
+       }
+
+
        /// <summary>
        /// helper class to bind in one step icon, caption, action, and validity tests to a controls 
        /// </summary>
@@ -67,8 +101,7 @@ namespace Crow {
                }
                /// <summary>
                /// Icon to display in the bound control
-               /// </summary>
-               
+               /// </summary>          
                public string Icon {
                        get { return icon; }
                        set {
index 5ba93968f826c9e392872d309d10fe76208c3405..d984c8a8cdc7357ac72da19704721745569934e1 100644 (file)
@@ -1,28 +1,6 @@
-//
-// Node.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 using System;
 using System.Reflection;
index 80e9156fab9f08b82f2c633c6fdad75124a8ff35..61555bb62e7f0307903606aa4fc1c20b3740d5e5 100644 (file)
@@ -1,28 +1,6 @@
-//
-// NodeStack.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 using System;
 using System.Collections.Generic;
@@ -31,9 +9,6 @@ namespace Crow.IML
 {
        public class NodeStack : Stack<Node>
        {
-               public NodeStack () : base()
-               {
-               }
                public void IncrementCurrentNodeIndex(){
                        Node n = this.Pop();
                        this.Push (new Node (n.CrowType, n.Index + 1));
index 77360f3eae4b3a7477d6366327e24597e6b59883..8babc221da5bc8deea22467027918b29daf23e8e 100644 (file)
@@ -314,9 +314,9 @@ namespace Crow
                /// <summary>Crow configuration root path</summary>
                public static string CROW_CONFIG_ROOT;
                /// <summary>If true, mouse focus is given when mouse is over control</summary>
-               public static bool FOCUS_ON_HOVER = true;
+               public static bool FOCUS_ON_HOVER = false;
                /// <summary> Threshold to catch borders for sizing </summary>
-               public static int BorderThreshold = 10;
+               public static int BorderThreshold = 3;
                /// <summary> delay before tooltip appears </summary>
                public static int TOOLTIP_DELAY = 500;
                /// <summary>Double click threshold in milisecond</summary>
@@ -603,7 +603,7 @@ namespace Crow
                public Widget ActiveWidget
                {
                        get { return _activeWidget; }
-                       set
+                       internal set
                        {
                                if (_activeWidget == value)
                                        return;
@@ -645,7 +645,7 @@ namespace Crow
 
                                #if DEBUG_FOCUS
                                NotifyValueChanged("HoverWidget", _hoverWidget);
-#endif
+                               #endif
 
                                if (DragAndDropOperation == null && FOCUS_ON_HOVER) {
                                        Widget w = _hoverWidget;
@@ -672,7 +672,7 @@ namespace Crow
                }
                /// <summary>Widget has the keyboard or mouse focus</summary>
                public Widget FocusedWidget {
-                       get { return _focusedWidget; }
+                       get => _focusedWidget;
                        set {
                                if (_focusedWidget == value)
                                        return;
@@ -1130,13 +1130,29 @@ namespace Crow
                                //MouseCursorChanged.Raise (this,new MouseCursorChangedEventArgs(cursor));
                        }
                }
+
+               uint stickyMouse = 0;
+               Point stickyMousePos = default;
+               internal void SetStickyMouse (uint threshold = 5)
+               {
+                       stickyMouse = threshold;
+                       stickyMousePos = MousePosition;
+               }
+
                /// <summary>Processes mouse move events from the root container, this function
                /// should be called by the host on mouse move event to forward events to crow interfaces</summary>
                /// <returns>true if mouse is in the interface</returns>
                public virtual bool OnMouseMove (int x, int y)
                {
+
+                       if (stickyMouse>0) {
+                               if (Math.Abs(x - stickyMousePos.X) < stickyMouse && Math.Abs(y - stickyMousePos.Y) < stickyMouse)
+                                       return true;
+                               stickyMouse = 0;
+                       }
                        int deltaX = x - MousePosition.X;
                        int deltaY = y - MousePosition.Y;
+
                        MousePosition = new Point (x, y);
                        MouseMoveEventArgs e = new MouseMoveEventArgs (x, y, deltaX, deltaY);
 
@@ -1246,16 +1262,15 @@ namespace Crow
                        mouseRepeatTimer.Reset ();
                        lastMouseDownEvent = null;
 
-                       MouseButtonEventArgs e = new MouseButtonEventArgs (MousePosition.X, MousePosition.Y, button, InputAction.Repeat);
                        if (_activeWidget == null)
                                return false;
 
-                       _activeWidget.onMouseUp (_activeWidget, e);
+                       _activeWidget.onMouseUp (_activeWidget, new MouseButtonEventArgs (MousePosition.X, MousePosition.Y, button, InputAction.Release));
 
                        if (doubleClickTriggered)
-                               _activeWidget.onMouseDoubleClick (_activeWidget, e);
+                               _activeWidget.onMouseDoubleClick (_activeWidget, new MouseButtonEventArgs (MousePosition.X, MousePosition.Y, button, InputAction.Press));
                        else
-                               _activeWidget.onMouseClick (_activeWidget, e);
+                               _activeWidget.onMouseClick (_activeWidget, new MouseButtonEventArgs (MousePosition.X, MousePosition.Y, button, InputAction.Press));
 
                        ActiveWidget = null;
                        //                      if (!lastActive.MouseIsIn (Mouse.Position)) {
index cd0297f7a728d07c38151f80fb1e859309894175..a5cd39d8adea04d475eeb784906a2afb36ece447 100644 (file)
@@ -46,6 +46,7 @@ namespace Crow
                public override void onMouseClick (object sender, MouseButtonEventArgs e)
                {
                        IsChecked = !IsChecked;
+                       e.Handled = true;
                        base.onMouseClick (sender, e);
                }
        }
index 68541c5f1acc1300017e571150568f4ad835bf23..fa2fe46b45ccbfe235723b24cdc3bbdd1de781bf 100644 (file)
@@ -723,12 +723,14 @@ namespace Crow {
                }
                public override void onMouseDown (object sender, MouseButtonEventArgs e)
                {
-                       if (this.HasFocus && _selectable){
-                               updatemouseLocalPos (e.Position);
-                               SelBegin = -1;
-                               SelRelease = -1;
-                               SelectionInProgress = true;
-                               RegisterForRedraw();//TODO:should put it in properties
+                       if (HasFocus) {
+                               if (_selectable) {
+                                       updatemouseLocalPos (e.Position);
+                                       SelBegin = -1;
+                                       SelRelease = -1;
+                                       SelectionInProgress = true;
+                                       RegisterForRedraw ();//TODO:should put it in properties
+                               }
                        }
 
                        //done at the end to set 'hasFocus' value after testing it
@@ -737,7 +739,7 @@ namespace Crow {
                public override void onMouseUp (object sender, MouseButtonEventArgs e)
                {
                        base.onMouseUp (sender, e);
-                       if (!(this.HasFocus || _selectable))
+                       if (!(HasFocus || _selectable))
                                return;
                        if (!SelectionInProgress)
                                return;
index 495d82d679da16947cd9ed053d8a74e1404478b6..c2ba3f433f1473e1f44888154b78dff78bf1497c 100644 (file)
@@ -1,31 +1,8 @@
-//
-// MessageBox.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 using System;
-using System.Xml.Serialization;
 using System.ComponentModel;
 
 namespace Crow
@@ -33,8 +10,8 @@ namespace Crow
        public class MessageBox : Window
        {
                #region CTOR
-               protected MessageBox () : base(){}
-               public MessageBox (Interface iface) : base(iface){}
+               protected MessageBox () {}
+               public MessageBox (Interface iface, string style = null) : base(iface, style){}
                #endregion
 
                public enum Type {
index 45ecbf81057431e87baaa3b219b987dc4c01dba4..314917be950165fc5f9fa705f03ce25d4856b56d 100644 (file)
@@ -214,7 +214,7 @@ namespace Crow
                #region mouse handling
                public override void onMouseDown (object sender, MouseButtonEventArgs e)
                {
-                       base.onMouseDown (sender, e);
+                       e.Handled = true;
                        mouseDownInit = ScreenPointToLocal (e.Position);
                        mouseDownInitValue = Value;
                        Rectangle cursInScreenCoord = cursor == null ? default : cursor.ScreenCoordinates (cursor.Slot);
@@ -235,12 +235,13 @@ namespace Crow
                        else
                                Value += LargeIncrement;
 
+                       base.onMouseDown (sender, e);
                }
                public override void onMouseUp (object sender,MouseButtonEventArgs e)
                {
-                       base.onMouseUp (sender, e);
-
                        holdCursor = false;
+                       e.Handled = true;
+                       base.onMouseUp (sender, e);
                }
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
index f385534cba79563287f48fb461a453dbbe112f1b..37502031c676d9b545db2662df018ce94580cf30 100644 (file)
@@ -73,8 +73,7 @@ namespace Crow
                                IFace.MouseCursor = MouseCursor.sb_v_double_arrow;
                }
                public override void onMouseDown (object sender, MouseButtonEventArgs e)
-               {
-                       base.onMouseDown (sender, e);
+               {               
                        go1 = go2 = null;
                        init1 = init2 = -1;
                        delta = 0;
@@ -108,46 +107,49 @@ namespace Crow
                                if (init2 >= 0)
                                        go2.Height = init2;
                        }
+                       e.Handled = true;
+                       base.onMouseDown (sender, e);
                }
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
+                       e.Handled = true;
                        base.onMouseMove (sender, e);
 
-                       if (!IsActive || go1 == null || go2 == null)
-                               return;
-
-                       GenericStack gs = Parent as GenericStack;
-                       int newDelta = delta, size1 = init1 , size2 = init2;
-                       if (gs.Orientation == Orientation.Horizontal) {
-                               newDelta -= e.XDelta;
-                               if (size1 < 0)
-                                       size1 = go1.Slot.Width + delta;
-                               if (size2 < 0)
-                                       size2 = go2.Slot.Width - delta;
-                       } else {
-                               newDelta -= e.YDelta;
-                               if (size1 < 0)
-                                       size1 = go1.Slot.Height + delta;
-                               if (size2 < 0)
-                                       size2 = go2.Slot.Height - delta;
-                       }
+                       if (IsActive && go1 != null && go2 != null) {
+                               GenericStack gs = Parent as GenericStack;
+                               int newDelta = delta, size1 = init1, size2 = init2;
+                               if (gs.Orientation == Orientation.Horizontal) {
+                                       newDelta -= e.XDelta;
+                                       if (size1 < 0)
+                                               size1 = go1.Slot.Width + delta;
+                                       if (size2 < 0)
+                                               size2 = go2.Slot.Width - delta;
+                               } else {
+                                       newDelta -= e.YDelta;
+                                       if (size1 < 0)
+                                               size1 = go1.Slot.Height + delta;
+                                       if (size2 < 0)
+                                               size2 = go2.Slot.Height - delta;
+                               }
 
-                       if (size1 - newDelta < min1 || (max1 > 0 && size1 - newDelta > max1) ||
-                               size2 + newDelta < min2 || (max2 > 0 && size2 + newDelta > max2))
-                               return;
+                               if (size1 - newDelta < min1 || (max1 > 0 && size1 - newDelta > max1) ||
+                                       size2 + newDelta < min2 || (max2 > 0 && size2 + newDelta > max2))
+                                       return;
 
-                       delta = newDelta;
+                               delta = newDelta;
+
+                               if (gs.Orientation == Orientation.Horizontal) {
+                                       if (init1 >= 0)
+                                               go1.Width = init1 - delta;
+                                       if (init2 >= 0)
+                                               go2.Width = init2 + delta;
+                               } else {
+                                       if (init1 >= 0)
+                                               go1.Height = init1 - delta;
+                                       if (init2 >= 0)
+                                               go2.Height = init2 + delta;
+                               }
 
-                       if (gs.Orientation == Orientation.Horizontal) {
-                               if (init1 >= 0)
-                                       go1.Width = init1 - delta;
-                               if (init2 >= 0)
-                                       go2.Width = init2 + delta;
-                       } else {
-                               if (init1 >= 0)
-                                       go1.Height = init1 - delta;
-                               if (init2 >= 0)
-                                       go2.Height = init2 + delta;
                        }
                }
                public override void onMouseUp (object sender, MouseButtonEventArgs e)
index 60b43f45f56b13bf2545568f641555676d9b40ae..06b2b2d94f31109ba96f4fa9cb9e520e692077a6 100644 (file)
@@ -18,7 +18,9 @@ namespace Crow
                [XmlIgnore]public override bool HasFocus   //trigger update when lost focus to errase text beam
         {
             get => base.HasFocus;
-            set {
+            internal set {
+                               if (base.HasFocus == value)
+                                       return;
                 base.HasFocus = value;
                 RegisterForRedraw();
             }
@@ -40,22 +42,22 @@ namespace Crow
                        case Key.Backspace:
                                if (CurrentPosition == 0)
                                        return;
-                               this.DeleteChar();
+                               DeleteChar();
                                break;
                        case Key.Delete:
                                if (selectionIsEmpty) {
                                        if (!MoveRight ())
                                                return;
                                }else if (IFace.Shift)
-                                       IFace.Clipboard = this.SelectedText;
-                               this.DeleteChar ();
+                                       IFace.Clipboard = SelectedText;
+                               DeleteChar ();
                                break;
                        case Key.KeypadEnter:
                        case Key.Enter:
                                if (!selectionIsEmpty)
-                                       this.DeleteChar ();
+                                       DeleteChar ();
                                if (Multiline)
-                                       this.InsertLineBreak ();
+                                       InsertLineBreak ();
                                else
                                        OnTextChanged(this,new TextChangeEventArgs(Text));
                                break;
index ca678fdd351dd6e7a174be8a72389f2c1ffe67b7..a1bf5588895d847cfe9fb6ff8672300c6fd34ede 100644 (file)
@@ -349,7 +349,7 @@ namespace Crow
                /// <summary>
                /// Mouse routing need to go back to logical parent for popups
                /// </summary>
-               public Widget FocusParent => (parent is Interface ? LogicalParent : parent) as Widget; 
+               internal Widget FocusParent => (parent is Interface ? LogicalParent : parent) as Widget; 
 
                [XmlIgnore]public ILayoutable LogicalParent {
                        get { return logicalParent == null ? Parent : logicalParent; }
@@ -679,7 +679,7 @@ namespace Crow
                /// </summary>
                [XmlIgnore]public virtual bool HasFocus {
                        get { return hasFocus; }
-                       set {
+                       internal set {
                                if (value == hasFocus)
                                        return;
 
@@ -697,7 +697,7 @@ namespace Crow
                /// </summary>
                [XmlIgnore]public virtual bool IsActive {
                        get { return isActive; }
-                       set {
+                       internal set {
                                if (value == isActive)
                                        return;
 
@@ -710,7 +710,7 @@ namespace Crow
                /// </summary>
                [XmlIgnore]public virtual bool IsHover {
                        get { return isHover; }
-                       set {
+                       internal set {
                                if (value == isHover)
                                        return;
 
@@ -1392,7 +1392,7 @@ namespace Crow
                        if (r.Bottom > cb.Bottom)
                                r.Height -= r.Bottom - cb.Bottom;
                        if (r.Width < 0 || r.Height < 0) {
-                               Debug.WriteLine ($"Invalid clip: {clip}:{r} hnd:{this}");//\n{Environment.StackTrace}");
+                               //Debug.WriteLine ($"Invalid clip: {clip}:{r} hnd:{this}");//\n{Environment.StackTrace}");
                                return;
                        }
                        if (cacheEnabled && !IsDirty)
@@ -1413,7 +1413,7 @@ namespace Crow
                {
 #if DEBUG
                        if (disposed) {
-                               System.Diagnostics.Debug.WriteLine ($"RegisterForGraphicUpdate for disposed Widget: {this}\n{System.Environment.StackTrace}");
+//                             System.Diagnostics.Debug.WriteLine ($"RegisterForGraphicUpdate for disposed Widget: {this}\n{System.Environment.StackTrace}");
                                return;
                        }
 #endif
@@ -1854,8 +1854,8 @@ namespace Crow
                public virtual void checkHoverWidget(MouseMoveEventArgs e)
                {
                        if (IFace.HoverWidget != this) {
-                               IFace.HoverWidget = this;
                                onMouseEnter (this, e);
+                               IFace.HoverWidget = this;
                        }
 
                        //this.onMouseMove (this, e);//without this, window border doesn't work, should be removed
@@ -1885,6 +1885,8 @@ namespace Crow
 #if DEBUG_FOCUS
                        Debug.WriteLine("MOUSE DOWN => " + this.ToString());
 #endif
+                       if (Focusable)
+                               IFace.FocusedWidget = this;
 
                        if (e.Button == MouseButton.Right && contextCommands != null) {
                                IFace.ShowContextMenu (this);
@@ -1943,7 +1945,7 @@ namespace Crow
                {
                        #if DEBUG_FOCUS
                        Debug.WriteLine("MouseEnter => " + this.ToString());
-#endif
+                       #endif
 
                        IFace.MouseCursor = MouseCursor;
 
index fb09ba04d49089b52a71840faae3d22a013372e1..accf198c88782d94c2d6dcd7b0b01c071b433b86 100644 (file)
@@ -29,8 +29,6 @@ namespace Crow
                bool modal;
                protected bool hoverBorder = false;
                bool alwaysOnTop = false;
-               Fill titleBarBackground = Colors.SteelBlue;
-               Fill titleBarForeground = Colors.White;
 
                Rectangle savedBounds;
                bool _minimized = false;
@@ -49,6 +47,9 @@ namespace Crow
                public Window (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
+               Widget moveHandle, sizingHandle;
+
+
                #region TemplatedContainer overrides
                protected override void loadTemplate(Widget template = null)
                {
@@ -57,6 +58,13 @@ namespace Crow
                        NotifyValueChanged ("ShowNormal", false);
                        NotifyValueChanged ("ShowMinimize", true);
                        NotifyValueChanged ("ShowMaximize", true);
+
+                       moveHandle = child?.FindByName ("MoveHandle");
+                       sizingHandle = child?.FindByName ("SizeHandle");
+
+                       if (sizingHandle == null)
+                               return;
+                       sizingHandle.MouseEnter += (arg1, arg2) => IFace.SetStickyMouse(5);
                }
                #endregion
 
@@ -71,34 +79,6 @@ namespace Crow
                                NotifyValueChangedAuto (_icon);
                        }
                } 
-               /// <summary>
-               /// Background of the title bar if any.
-               /// </summary>
-               [DefaultValue("vgradient|0:Onyx|1:SteelBlue")]
-               public virtual Fill TitleBarBackground {
-                       get { return titleBarBackground; }
-                       set {
-                               if (titleBarBackground == value)
-                                       return;
-                               titleBarBackground = value;
-                               NotifyValueChangedAuto (titleBarBackground);
-                               RegisterForRedraw ();
-                       }
-               }
-               /// <summary>
-               /// Foreground of the title bar, usualy used for the window caption color.
-               /// </summary>
-               [DefaultValue("White")]
-               public virtual Fill TitleBarForeground {
-                       get { return titleBarForeground; }
-                       set {
-                               if (titleBarForeground == value)
-                                       return;
-                               titleBarForeground = value;
-                               NotifyValueChangedAuto (titleBarForeground);
-                               RegisterForRedraw ();
-                       }
-               }
                [DefaultValue(true)]
                public bool Resizable {
                        get {
@@ -171,20 +151,6 @@ namespace Crow
                                NotifyValueChangedAuto (AlwaysOnTop);
                        }
                }
-//             [DefaultValue(WindowState.Normal)]
-//             public virtual WindowState State {
-//                     get { return _state; }
-//                     set {
-//                             if (_state == value)
-//                                     return;
-//                             _state = value;
-//                             NotifyValueChanged ("State", _state);
-//                             NotifyValueChanged ("IsNormal", IsNormal);
-//                             NotifyValueChanged ("IsMaximized", IsMaximized);
-//                             NotifyValueChanged ("IsMinimized", IsMinimized);
-//                             NotifyValueChanged ("IsNotMinimized", IsNotMinimized);
-//                     }
-//             } 
                #endregion
 
                /// <summary>
@@ -264,6 +230,9 @@ namespace Crow
                        }                       
                }
 
+               bool maySize => sizingHandle == null ? false : resizable & sizingHandle.IsHover;
+               bool mayMove => moveHandle == null ? false : movable & moveHandle.IsHover;
+
                #region GraphicObject Overrides
                public override void onMouseMove (object sender, MouseMoveEventArgs e)
                {
@@ -271,24 +240,17 @@ namespace Crow
 
                        Interface otkgw = IFace;
 
-                       if (HasFocus) {
-                               if (movable) {
-                                       if (IFace.IsDown (MouseButton.Left)) {
-                                               MoveAndResize (e.XDelta, e.YDelta, currentDirection);
-                                               return;
-                                       }
+                       if (maySize || mayMove) {
+                               if (grabMouse) {
+                                       MoveAndResize (e.XDelta, e.YDelta, currentDirection);
+                                       return;
                                }
-                       } else {
-                               currentDirection = Direction.None;
+                       }else
                                return;
-                       }
-
 
                        Point m = Parent is Widget ? (Parent as Widget).ScreenPointToLocal (e.Position) : e.Position;
 
-                       if (Resizable) {
-                               Direction lastDir = currentDirection;
-
+                       if (maySize) {
                                if (Math.Abs (m.Y - this.Slot.Y) < Interface.BorderThreshold) {
                                        if (Math.Abs (m.X - this.Slot.X) < Interface.BorderThreshold)
                                                currentDirection = Direction.NW;
@@ -307,41 +269,41 @@ namespace Crow
                                        currentDirection = Direction.W;
                                else if (Math.Abs (m.X - this.Slot.Right) < Interface.BorderThreshold)
                                        currentDirection = Direction.E;
-                               else
-                                       currentDirection = Direction.None;
-
-                               //if (currentDirection != lastDir) {
-                                       switch (currentDirection) {
-                                       case Direction.None:
-                                               otkgw.MouseCursor = MouseCursor.move;
-                                               break;
-                                       case Direction.N:
-                                               otkgw.MouseCursor = MouseCursor.top_side;
-                                               break;
-                                       case Direction.S:
-                                               otkgw.MouseCursor = MouseCursor.bottom_side;
-                                               break;
-                                       case Direction.E:
-                                               otkgw.MouseCursor = MouseCursor.right_side;
-                                               break;
-                                       case Direction.W:
-                                               otkgw.MouseCursor = MouseCursor.left_side;
-                                               break;
-                                       case Direction.NW:
-                                               otkgw.MouseCursor = MouseCursor.top_left_corner;
-                                               break;
-                                       case Direction.NE:
-                                               otkgw.MouseCursor = MouseCursor.top_right_corner;
-                                               break;
-                                       case Direction.SW:
-                                               otkgw.MouseCursor = MouseCursor.bottom_left_corner;
-                                               break;
-                                       case Direction.SE:
-                                               otkgw.MouseCursor = MouseCursor.bottom_right_corner;
-                                               break;
-                                       }
-                               //}                             
-                       }                               
+                       } else if (mayMove)
+                               currentDirection = Direction.None;
+                       else
+                               return;
+
+                       switch (currentDirection) {
+                       case Direction.None:
+                               otkgw.MouseCursor = MouseCursor.move;
+                               break;
+                       case Direction.N:
+                               otkgw.MouseCursor = MouseCursor.top_side;
+                               break;
+                       case Direction.S:
+                               otkgw.MouseCursor = MouseCursor.bottom_side;
+                               break;
+                       case Direction.E:
+                               otkgw.MouseCursor = MouseCursor.right_side;
+                               break;
+                       case Direction.W:
+                               otkgw.MouseCursor = MouseCursor.left_side;
+                               break;
+                       case Direction.NW:
+                               otkgw.MouseCursor = MouseCursor.top_left_corner;
+                               break;
+                       case Direction.NE:
+                               otkgw.MouseCursor = MouseCursor.top_right_corner;
+                               break;
+                       case Direction.SW:
+                               otkgw.MouseCursor = MouseCursor.bottom_left_corner;
+                               break;
+                       case Direction.SE:
+                               otkgw.MouseCursor = MouseCursor.bottom_right_corner;
+                               break;
+                       }
+                                                       
                }
                public override void onMouseLeave (object sender, MouseMoveEventArgs e)
                {
@@ -349,10 +311,19 @@ namespace Crow
                        currentDirection = Direction.None;
                        IFace.MouseCursor = MouseCursor.top_left_arrow;
                }
+               bool grabMouse;
                public override void onMouseDown (object sender, MouseButtonEventArgs e)
                {
+                       grabMouse = true;
+                       e.Handled = true;
                        base.onMouseDown (sender, e);
                }
+               public override void onMouseUp (object sender, MouseButtonEventArgs e)
+               {
+                       grabMouse = false;
+                       e.Handled = true;
+                       base.onMouseUp (sender, e);
+               }
                public override bool MouseIsIn (Point m)
                {
                        return modal ? true : base.MouseIsIn (m);
@@ -363,9 +334,9 @@ namespace Crow
                        lock (IFace.LayoutMutex) {
                                if (!IsMinimized)
                                        savedBounds = this.LastPaintedSlot;
-                               this.Left = this.Top = 0;
-                               this.RegisterForLayouting (LayoutingType.Positioning);
-                               this.Width = this.Height = Measure.Stretched;
+                               Left = Top = 0;
+                               RegisterForLayouting (LayoutingType.Positioning);
+                               Width = Height = Measure.Stretched;
                                IsMinimized = false;
                                Resizable = false;
                                NotifyValueChanged ("ShowNormal", true);
@@ -377,10 +348,10 @@ namespace Crow
                }
                protected void onUnmaximized (object sender, EventArgs e){
                        lock (IFace.LayoutMutex) {
-                               this.Left = savedBounds.Left;
-                               this.Top = savedBounds.Top;
-                               this.Width = savedBounds.Width;
-                               this.Height = savedBounds.Height;
+                               Left = savedBounds.Left;
+                               Top = savedBounds.Top;
+                               Width = savedBounds.Width;
+                               Height = savedBounds.Height;
                                IsMinimized = false;
                                Resizable = true;
                                NotifyValueChanged ("ShowNormal", false);
@@ -418,14 +389,14 @@ namespace Crow
                                (Parent as Interface).DeleteWidget (this);
                        else {
                                Widget p = Parent as Widget;
-                               if (p is Group) {
+                               if (p is Group g) {
                                        lock (IFace.UpdateMutex) {
                                                RegisterClip (p.ScreenCoordinates (p.LastPaintedSlot));
-                                               (p as Group).DeleteChild (this);
+                                               g.DeleteChild (this);
                                        }
                                        //(Parent as Group).RegisterForRedraw ();
-                               } else if (Parent is PrivateContainer)
-                                       (Parent as Container).Child = null;
+                               } else if (Parent is Container c)
+                                       c.Child = null;
                        }
                }
 
@@ -436,6 +407,7 @@ namespace Crow
                                return w;
                        }
                }
+
        }
 }
 
index 82fd4ab516335d85a4d953768f2f569f055d0ef7..fe05d1e284d65a39ae634b2f9a054beac5440028 100644 (file)
@@ -1,39 +1,2 @@
-<Container Background="Onyx">
-       <VerticalStack Background="Jet" Fit="true" Margin="1" Spacing="1"> 
-               <Gauge Width="200" Height="10" Background="RoyalBlue" Value="50" CornerRadius="5"/>
-               <NumericControl Width="200" Height="10" Value="40">
-                       <Template>
-                               <Gauge Maximum="{./Maximum}" Foreground="Black" BorderWidth="1" Background="RoyalBlue" Value="{./Value}" CornerRadius="5"/>
-                       </Template>
-               </NumericControl>
-               <Gauge Width="10" Height="100" Background="RoyalBlue" Value="50" CornerRadius="5" Orientation="Vertical"/>
-               <HorizontalStack Width="400" Height="300">
-                       <Scroller Name="scroller1" Background="White"
-                                       Margin="2" ScrollY="{../scrollbar1.Value}"
-                                       ValueChanged="./_scroller_ValueChanged">
-                               <Widget VerticalAlignment="Top" Background="vgradient|0:1,0,0,1|1:0,1,0,1" Width="1000" Height="1000"/>
-                       </Scroller>
-                       <Slider Template="#Crow.VScrollBar.template" Name="scrollbar1" Value="{../scroller1.ScrollY}"
-                               LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" Height="Stretched" 
-                               CursorSize="{../scroller1.ChildHeightRatio}"
-                               Maximum="{../scroller1.MaxScrollY}" Orientation="Vertical" Width="14" >
-                               <Template>
-                                       <Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}">
-                                               <GenericStack Orientation="{./Orientation}" Spacing="0">
-                                                       <Shape Style="ArrowBut" MouseDown="./OnDecrease"
-                                                               Height="10" Size="10,10" Path="M 4.5,0.5 L 9.5,9.5 L 0.5,9.5 Z F"/>
-                                                       <Gauge Name="Slider"                    
-                                                               Orientation="{./Orientation}"
-                                                               Value="{²./Value}"
-                                                               Maximum="{./Maximum}"
-                                                               Height="{./HeightPolicy}" Width="{./WidthPolicy}"
-                                                               Background="RoyalBlue" Foreground="{./Foreground}"/>
-                                                       <Shape Style="ArrowBut" MouseDown="./OnIncrease"
-                                                               Height="10" Size="10,10" Path="M 0.5,0.5 L 9.5,0.5 L 4.5,9.5 Z F"/>
-                                               </GenericStack>
-                                       </Border>                                       
-                               </Template>
-                       </Slider>
-               </HorizontalStack>
-       </VerticalStack>
-</Container>
\ No newline at end of file
+<?xml version="1.0"?>
+<Label Text="Hello World"/>
\ No newline at end of file
diff --git a/Samples/ShowCase/ui/focused.crow b/Samples/ShowCase/ui/focused.crow
new file mode 100644 (file)
index 0000000..755345a
--- /dev/null
@@ -0,0 +1,17 @@
+<Window Width="80%" Movable="false">
+       <VerticalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Hover:" Width="50" Foreground="Grey"/>
+                       <Label Text="{HoverWidget}" Font="mono, 8"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Focus:" Width="50" Foreground="Grey"/>
+                       <Label Text="{FocusedWidget}" Font="mono, 8"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Active:" Width="50" Foreground="Grey"/>
+                       <Label Text="{ActiveWidget}" Font="mono, 8"/>
+               </HorizontalStack>              
+       </VerticalStack>
+</Window>
+
diff --git a/Samples/ShowCase/ui/helloworld.crow b/Samples/ShowCase/ui/helloworld.crow
deleted file mode 100644 (file)
index 1d1a351..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<Window Caption="Hello World" Icon="#Crow.Icons.crow.svg" Width="40%" Height="40%" CornerRadius="5">
-    <VerticalStack>
-        <Label Text="Hello World" Font="mono, 20"/>
-        <Image Path="#Crow.Icons.crow.svg"/>
-    </VerticalStack>
-</Window>
-
index 5405a5ef81e4d204b384f27ac5dfb2ede98883cf..83700273a70dd1fe2bb04236ef066ce6d519bec3 100644 (file)
@@ -24,7 +24,7 @@
                                                ValueChanged="./_scroller_ValueChanged">
                                        <TextBox VerticalAlignment="Top"
                                                Text="{²Source}" Multiline="true" TextAlignment="TopLeft"
-                                               Font="Courriernew 10"/>
+                                               Font="mono 10"/>
                                </Scroller>
                                <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}"
                                        LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
index a4caf8189a16452d81501caa27a41d5038323b8f..a2fb0862e2df84b4dd906204ab4b4c69740e720e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <HorizontalStack Margin="50">
        <VerticalStack Spacing="10" Width="50%">
-               <Slider Height="20" Width="Stretched"/>
+               <Slider Background="DarkGrey" Height="20" Width="Stretched"/>
                <Slider Background="RoyalBlue" Height="50" Width="Stretched" CursorSize="50">
                        <Template>
                                <Group Background="DarkGrey" >