From 7995e83b47cd75895fbf597f6f277ab2007ca905 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Thu, 20 Apr 2017 14:08:49 +0200 Subject: [PATCH] tests with themes, bluez controls --- Crow.csproj | 1 + Default.style | 11 +- Images/Icons/arrows.svg | 22 +++ Templates/Button.template | 2 +- Tests/BasicTests.cs | 23 +-- Tests/Interfaces/Divers/0.crow | 8 +- Tests/Interfaces/Divers/1.crow | 198 +++++++++++++++++++++++++ Tests/Tests.csproj | 20 +++ Tests/Theme/Blues.style | 39 +++++ Tests/Theme/bluez/CheckBox.template | 10 ++ Tests/Theme/bluez/ComboBox.template | 24 +++ Tests/Theme/bluez/RadioButton.template | 10 ++ Tests/Theme/bluez/Spinner.template | 16 ++ Tests/image/screenshot--tech-frame.svg | 12 ++ 14 files changed, 370 insertions(+), 26 deletions(-) create mode 100644 Images/Icons/arrows.svg create mode 100755 Tests/Interfaces/Divers/1.crow create mode 100644 Tests/Theme/Blues.style create mode 100755 Tests/Theme/bluez/CheckBox.template create mode 100755 Tests/Theme/bluez/ComboBox.template create mode 100755 Tests/Theme/bluez/RadioButton.template create mode 100755 Tests/Theme/bluez/Spinner.template create mode 100644 Tests/image/screenshot--tech-frame.svg diff --git a/Crow.csproj b/Crow.csproj index 20b38cf8..b0ab8b39 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -309,6 +309,7 @@ + diff --git a/Default.style b/Default.style index 0db6a08a..f5545919 100644 --- a/Default.style +++ b/Default.style @@ -6,6 +6,9 @@ MessageBox, Popper, Slider, Spinner, TextBox { Border { Foreground = Gray; } +GroupBox { + Foreground = Gray; +} CheckBox { Caption = CheckBox; } RadioButton { Caption = RadioButton; } Expandable { Caption = Expandable; } @@ -21,7 +24,7 @@ Button { Label { Height = Fit; Width = Fit; - Margin = 0; + Margin = 1; } Menu { Margin = 1; @@ -107,12 +110,12 @@ Scroller { } Icon { Margin=1; - Width=12; - Height=12; + Width=14; + Height=14; } Control { Margin=0; - Spacing=3; + Spacing=2; } SaturationValueSelector { Foreground=Red; diff --git a/Images/Icons/arrows.svg b/Images/Icons/arrows.svg new file mode 100644 index 00000000..737849eb --- /dev/null +++ b/Images/Icons/arrows.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/Templates/Button.template b/Templates/Button.template index 92ddb39c..fabecaa7 100755 --- a/Templates/Button.template +++ b/Templates/Button.template @@ -1,5 +1,5 @@ - List2 = new List(new string[] { - "string1", - "string2", - "string3", -// "string4", -// "string5", -// "string6", -// "string7", -// "string8", -// "string8", -// "string8", -// "string8", -// "string8", -// "string8", -// "string9" + "Item 1", + "Item 2", + "Item 3", } ); public IList TestList2 { @@ -142,6 +131,7 @@ namespace Tests //testFiles = new string [] { @"Interfaces/Unsorted/testFileDialog.crow" }; //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" }; testFiles = new string [] { @"Interfaces/Divers/welcome.crow" }; + testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray (); @@ -151,7 +141,6 @@ namespace Tests testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray (); - testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray (); object tc = Color.AirForceBlueRaf; @@ -163,8 +152,8 @@ namespace Tests Quit (null, null); return; } else if (e.Key == OpenTK.Input.Key.F1) { - TestList.Add ("new string"); - NotifyValueChanged ("TestList", TestList); + GraphicObject w = Load ("Interfaces/TemplatedContainer/testMsgBox.crow"); + w.DataSource = this; return; } else if (e.Key == OpenTK.Input.Key.F4) { GraphicObject w = Load ("Interfaces/TemplatedContainer/testWindow.goml"); diff --git a/Tests/Interfaces/Divers/0.crow b/Tests/Interfaces/Divers/0.crow index 15ab65f4..480dde3b 100755 --- a/Tests/Interfaces/Divers/0.crow +++ b/Tests/Interfaces/Divers/0.crow @@ -142,13 +142,13 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/image/screenshot--tech-frame.svg b/Tests/image/screenshot--tech-frame.svg new file mode 100644 index 00000000..174772c0 --- /dev/null +++ b/Tests/image/screenshot--tech-frame.svg @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file -- 2.47.3