From 80ceca9f199f37928f8c3068d07732b77d45156f Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Fri, 12 Aug 2016 03:37:29 +0200 Subject: [PATCH] * Crow.csproj, Default.style, button.svg, buttest.svg, buttest2.svg, buttest4.svg, 0.crow: test and divers * DirectoryView.cs: SelectedItem property * GraphicObject.cs: Style class, EventInfo in styles * Group.cs: lock children * Popper.cs: alignment = top left, simple unpop on mouse leave, no additional tests * Spinner.cs: ctor order * TabView.cs: code clean * Window.cs: movable * Style.cs, Interface.cs: Style class * StyleReader.cs: parser exception, debug expression parsing * Button.crow, Popper.goml, TabItem.crow, CheckBox.goml, Expandable.goml, MessageBox.goml, RadioButton.goml, ScrollingListBox.goml: templating * TreeView.crow: scrollbar * 1.crow: showcase * test.style, Tests.csproj, CheckBox2.imlt: tests --- Crow.csproj | 5 +- Default.style | 15 ++- Images/Icons/buttest.svg | 140 -------------------------- Images/Icons/buttest2.svg | 140 -------------------------- Images/Icons/buttest4.svg | 151 ---------------------------- Images/Icons/button.svg | 151 ---------------------------- Style.cs | 34 +++++++ Templates/Button.crow | 4 +- Templates/CheckBox.goml | 4 +- Templates/Expandable.goml | 2 +- Templates/MessageBox.goml | 27 +++-- Templates/Popper.goml | 4 +- Templates/RadioButton.goml | 4 +- Templates/ScrollingListBox.goml | 2 +- Templates/TabItem.crow | 14 +-- Templates/TreeView.crow | 22 ++-- Tests/Interfaces/CheckBox2.imlt | 7 ++ Tests/Interfaces/basicTests/0.crow | 4 +- Tests/Interfaces/basicTests/1.crow | 146 ++++++++++++++++++++++++++- Tests/Tests.csproj | 1 + Tests/test.style | 12 ++- src/GraphicObjects/DirectoryView.cs | 13 +++ src/GraphicObjects/GraphicObject.cs | 26 ++++- src/GraphicObjects/Group.cs | 13 ++- src/GraphicObjects/Popper.cs | 10 +- src/GraphicObjects/Spinner.cs | 8 +- src/GraphicObjects/TabView.cs | 13 +-- src/GraphicObjects/Window.cs | 14 ++- src/Interface.cs | 4 +- src/StyleReader.cs | 84 +++++++++++----- 30 files changed, 388 insertions(+), 686 deletions(-) delete mode 100644 Images/Icons/buttest.svg delete mode 100644 Images/Icons/buttest2.svg delete mode 100644 Images/Icons/buttest4.svg delete mode 100644 Images/Icons/button.svg create mode 100644 Style.cs create mode 100644 Tests/Interfaces/CheckBox2.imlt diff --git a/Crow.csproj b/Crow.csproj index 07879eeb..45f60ec9 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -138,6 +138,7 @@ + @@ -173,11 +174,7 @@ - - - - diff --git a/Default.style b/Default.style index b21bd577..12f5110e 100644 --- a/Default.style +++ b/Default.style @@ -25,6 +25,9 @@ Splitter { Focusable = true; Background = DimGray; } +TabView { + CacheEnabled = false; +} TabItem { Focusable = true; CacheEnabled = false; @@ -33,6 +36,7 @@ TextBox { Background = White; Foreground = Black; Selectable = True; + Text = TextBox; } Window { Focusable = true; @@ -41,8 +45,17 @@ Window { Height = 150; } Border { - Foreground = White; + Foreground = Gray; } ProgressBar { Foreground = vgradient|0:BlueCrayola|0.5:SkyBlue|1:BlueCrayola; +} +Icon { + Margin=1; + Width=12; + Height=12; +} +Control { + Margin=0; + Spacing=3; } \ No newline at end of file diff --git a/Images/Icons/buttest.svg b/Images/Icons/buttest.svg deleted file mode 100644 index 97c61552..00000000 --- a/Images/Icons/buttest.svg +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/Images/Icons/buttest2.svg b/Images/Icons/buttest2.svg deleted file mode 100644 index 0323295d..00000000 --- a/Images/Icons/buttest2.svg +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/Images/Icons/buttest4.svg b/Images/Icons/buttest4.svg deleted file mode 100644 index 5bb1f0b9..00000000 --- a/Images/Icons/buttest4.svg +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/Images/Icons/button.svg b/Images/Icons/button.svg deleted file mode 100644 index 7c8a9945..00000000 --- a/Images/Icons/button.svg +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Style.cs b/Style.cs new file mode 100644 index 00000000..5824e735 --- /dev/null +++ b/Style.cs @@ -0,0 +1,34 @@ +// +// Style.cs +// +// Author: +// Jean-Philippe Bruyère +// +// Copyright (c) 2016 jp +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using System.Collections.Generic; + +namespace Crow +{ + public class Style : Dictionary + { + public Dictionary SubStyles; + public Style () : base() + { + } + } +} + diff --git a/Templates/Button.crow b/Templates/Button.crow index f7c376c7..959ad8cc 100755 --- a/Templates/Button.crow +++ b/Templates/Button.crow @@ -1,11 +1,11 @@ - \ No newline at end of file diff --git a/Templates/CheckBox.goml b/Templates/CheckBox.goml index 818e10c1..a3c0f23d 100755 --- a/Templates/CheckBox.goml +++ b/Templates/CheckBox.goml @@ -1,6 +1,6 @@  - - + \ No newline at end of file diff --git a/Templates/Expandable.goml b/Templates/Expandable.goml index b544fd07..3d75afaf 100755 --- a/Templates/Expandable.goml +++ b/Templates/Expandable.goml @@ -3,7 +3,7 @@ Height="{./HeightPolicy}" Width="{./WidthPolicy}"> - diff --git a/Templates/MessageBox.goml b/Templates/MessageBox.goml index 2468b7fc..f40b5640 100644 --- a/Templates/MessageBox.goml +++ b/Templates/MessageBox.goml @@ -1,33 +1,32 @@ - - - - + + + - - - - - -