From 7ff5f14fe6b875dff57b335c4eeeb42397a07c91 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Thu, 14 Apr 2016 09:36:03 +0200 Subject: [PATCH] proportional ui --- Crow.csproj | 7 + Styles/CheckBox.style | 2 +- Styles/ComboBox.style | 2 +- Styles/Expandable.style | 2 +- Styles/MessageBox.style | 2 +- Styles/Popper.style | 2 +- Styles/RadioButton.style | 2 +- Styles/Spinner.style | 2 +- Styles/TextRun.style | 2 + Templates/TabItem.crow | 2 +- Templates/TreeItem.crow | 6 +- Tests/GOLIBTestsOTK.cs | 9 + Tests/Interfaces/0.crow | 48 +-- Tests/Interfaces/5.crow | 4 +- Tests/Interfaces/7.crow | 46 +++ Tests/Interfaces/basicTests/0.crow | 6 + Tests/Interfaces/basicTests/1.crow | 4 + Tests/Interfaces/basicTests/2.crow | 4 + Tests/Interfaces/basicTests/4.crow | 377 +++++++++++++++++++++++ Tests/Interfaces/basicTests/5.crow | 6 + Tests/Interfaces/basicTests/6.crow | 6 + Tests/Interfaces/basicTests/7.crow | 46 +++ Tests/Interfaces/colorItem.crow | 4 +- Tests/Interfaces/test1.goml | 2 +- Tests/Interfaces/testColorList.crow | 2 +- Tests/Interfaces/testImage.crow | 26 +- Tests/Interfaces/testStacks.crow | 16 +- Tests/Interfaces/testTabView.crow | 2 +- Tests/Tests.csproj | 31 +- src/CompilerServices/CompilerServices.cs | 20 +- src/GraphicObjects/GenericStack.cs | 20 +- src/GraphicObjects/GraphicObject.cs | 47 +-- src/GraphicObjects/Group.cs | 12 +- src/GraphicObjects/Label.cs | 7 +- src/GraphicObjects/PrivateContainer.cs | 8 +- src/GraphicObjects/TextRun.cs | 17 +- src/Measure.cs | 101 ++++++ 37 files changed, 748 insertions(+), 154 deletions(-) create mode 100644 Styles/TextRun.style create mode 100755 Tests/Interfaces/7.crow create mode 100755 Tests/Interfaces/basicTests/0.crow create mode 100755 Tests/Interfaces/basicTests/1.crow create mode 100755 Tests/Interfaces/basicTests/2.crow create mode 100755 Tests/Interfaces/basicTests/4.crow create mode 100755 Tests/Interfaces/basicTests/5.crow create mode 100755 Tests/Interfaces/basicTests/6.crow create mode 100755 Tests/Interfaces/basicTests/7.crow create mode 100644 src/Measure.cs diff --git a/Crow.csproj b/Crow.csproj index 1eac1766..a9a61f18 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -22,6 +22,7 @@ v4.5 Crow project description 4194304 + 0.4 true @@ -127,6 +128,7 @@ + @@ -136,15 +138,19 @@ ..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\cairo-sharp.dll + gtk-sharp-3.0 ..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\gdk-sharp.dll + gtk-sharp-2.0 ..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\gio-sharp.dll + gio-sharp-3.0 ..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\glib-sharp.dll + glib-sharp-3.0 @@ -240,6 +246,7 @@ + diff --git a/Styles/CheckBox.style b/Styles/CheckBox.style index 06b099d9..13d2224a 100644 --- a/Styles/CheckBox.style +++ b/Styles/CheckBox.style @@ -1,2 +1,2 @@ Focusable = true -Height=-1 +Height=Fit diff --git a/Styles/ComboBox.style b/Styles/ComboBox.style index a5be8e2a..9fa3b267 100644 --- a/Styles/ComboBox.style +++ b/Styles/ComboBox.style @@ -1,2 +1,2 @@ Focusable = true -Height = -1 +Height = Fit diff --git a/Styles/Expandable.style b/Styles/Expandable.style index a5be8e2a..9fa3b267 100644 --- a/Styles/Expandable.style +++ b/Styles/Expandable.style @@ -1,2 +1,2 @@ Focusable = true -Height = -1 +Height = Fit diff --git a/Styles/MessageBox.style b/Styles/MessageBox.style index 294a996b..ed5cb20f 100644 --- a/Styles/MessageBox.style +++ b/Styles/MessageBox.style @@ -1,5 +1,5 @@ Width=200 -Height=-1 +Height=Fit Title=MessageBox Focusable=true MinimumSize=150;80 diff --git a/Styles/Popper.style b/Styles/Popper.style index a5be8e2a..9fa3b267 100644 --- a/Styles/Popper.style +++ b/Styles/Popper.style @@ -1,2 +1,2 @@ Focusable = true -Height = -1 +Height = Fit diff --git a/Styles/RadioButton.style b/Styles/RadioButton.style index a5be8e2a..9fa3b267 100644 --- a/Styles/RadioButton.style +++ b/Styles/RadioButton.style @@ -1,2 +1,2 @@ Focusable = true -Height = -1 +Height = Fit diff --git a/Styles/Spinner.style b/Styles/Spinner.style index a5be8e2a..9fa3b267 100644 --- a/Styles/Spinner.style +++ b/Styles/Spinner.style @@ -1,2 +1,2 @@ Focusable = true -Height = -1 +Height = Fit diff --git a/Styles/TextRun.style b/Styles/TextRun.style new file mode 100644 index 00000000..c2eb97fe --- /dev/null +++ b/Styles/TextRun.style @@ -0,0 +1,2 @@ +Fit = true +Margin = 2 diff --git a/Templates/TabItem.crow b/Templates/TabItem.crow index a889f4ee..c269bbe0 100644 --- a/Templates/TabItem.crow +++ b/Templates/TabItem.crow @@ -8,7 +8,7 @@ Name="TabTitle" HorizontalAlignment="Left" Height="{../../../TabThickness}" - Width="-1"> + Width="Fit">