]> O.S.I.I.S - jp/crow.git/commitdiff
default button sizing
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 9 Feb 2021 15:16:23 +0000 (16:16 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 9 Feb 2021 15:16:23 +0000 (16:16 +0100)
Crow/Default.style
Crow/Templates/Button.template
Crow/Templates/FileDialog.template
Crow/src/Widgets/TreeView.cs
Samples/PerfTests/Program.cs
Samples/common/SampleBase.cs

index 456376ece4ffe47d6d085c84035b10bc27be464f..8e7696992dc747f66e5be7644c5aff4005bbe055 100644 (file)
@@ -66,9 +66,10 @@ Wrapper {
        Orientation = "Vertical";
 }
 Button {
-       Caption = "Button";
-       MinimumSize = "50,20";
-       Width = "Fit";
+       Caption         = "Button";
+       MinimumSize = "50,22";
+       Height          = "22";
+       Width           = "Fit";
 }
 Label {
        Height = "Fit";
index c46da8c6b881bfdc4fbd76a69dd72d3c62215561..e9764460993cf60092241ae444467c3178c6408d 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border Background="{./Background}" Name="Content"
+<Border Background="{./Background}" Name="Content" Width="Stretched" Height="Stretched"
        Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
        MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black};{caption.Foreground=White}"
        MouseLeave="{Foreground=Transparent};{caption.Foreground=LightGrey}"
index 3967d9d8dc3956cf6c562ebac89fbf138bbeca64..c17da65ef9369780c86f97b76c256f1b4611855d 100644 (file)
@@ -50,7 +50,7 @@
                                        <CheckBox Style="CheckBoxAlt" Name="cbShowFiles" Caption="Show Files" IsChecked="{²./ShowFiles}"/>
                                        <CheckBox Style="CheckBoxAlt" Name="cbShowHidden" Caption="Show Hidden" IsChecked="{²./ShowHidden}"/>
                                </HorizontalStack>
-                               <HorizontalStack Fit="true" HorizontalAlignment="Right">
+                               <HorizontalStack Fit="true" HorizontalAlignment="Right" Margin="3" Spacing="3">
                                        <Button Caption="Ok" MouseClick="./onFileSelect"/>
                                        <Button Caption="Cancel" MouseClick="./onCancel"/>
                                </HorizontalStack>
index 2bcdfd8a6b1b6b5b746428547740e73bd0382c74..3e2fd9de07b66c111f102751a06cfad210ad191c 100644 (file)
@@ -7,8 +7,10 @@ using System.ComponentModel;
 
 namespace Crow
 {
-       //treeview expect expandable child (or not)
-       //if their are expandable, some functions and events are added
+       /// <summary>
+       /// Treeview expect expandable child (or not)
+       /// if their are expandable, some functions and events are added
+       /// </summary>
        public class TreeView : TemplatedGroup
        {
                bool isRoot;
@@ -18,6 +20,7 @@ namespace Crow
                public TreeView (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
+               //TODO: check if not obsolete (IsRoot)
                [DefaultValue(false)]
                public virtual bool IsRoot {
                        get { return isRoot; }
index d6ada8b490d7474297b03560557066e195df150a..cb96078b0a34171fb3ea29c98e976ab8fb442b1e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+// 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;
index 8e7befc523190b961357262abe81957315bbcd59..8307faed06ce435d9f2a73644237a62485ac5467 100644 (file)
@@ -22,7 +22,7 @@ namespace Crow
                                        return  NativeLibrary.Load("glfw", assembly, null);
                                case "rsvg-2.40":
                                        return  NativeLibrary.Load("rsvg-2", assembly, null);
-                       }                       
+                       }
                        Console.WriteLine ($"[UNRESOLVE] {assembly} {libraryName}");                    
                        return IntPtr.Zero;
                }
@@ -30,7 +30,7 @@ namespace Crow
                static SampleBase () {
                        System.Runtime.Loader.AssemblyLoadContext.Default.ResolvingUnmanagedDll+=resolveUnmanaged;
                }
-#endif                 
+#endif
                public Version CrowVersion => Assembly.GetAssembly (typeof (Widget)).GetName ().Version;
 
                #region Test values for Binding