From 13698c71260a0022f7f863322b0cea4b9cd6c271 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 15 Jun 2020 12:25:50 +0200 Subject: [PATCH] force measure in containers --- Crow/Default.style | 22 ++++--- Crow/Templates/FileDialog.template | 10 +-- Crow/Templates/MenuItem.template | 2 +- Crow/src/2d/Measure.cs | 3 + Crow/src/Widgets/CheckBox.cs | 1 - Crow/src/Widgets/GenericStack.cs | 6 +- Crow/src/Widgets/Group.cs | 11 +++- Crow/src/Widgets/PrivateContainer.cs | 45 ++++++++++---- Crow/src/Widgets/Widget.cs | 21 ++++++- Crow/src/Widgets/Wrapper.cs | 9 ++- Crow/src/debug/DbgEventTypeColors.cs | 2 +- Crow/src/debug/DbgLogViewer.cs | 61 ++++++------------- Crow/src/debug/DebugLogger.cs | 27 +------- .../ui/Interfaces/Stack/StretchedInFit2.crow | 15 +++++ .../ui/Interfaces/Stack/StretchedInFit3.crow | 15 +++++ .../ui/Interfaces/Stack/StretchedInFit4.crow | 12 ++++ .../ui/Interfaces/Stack/StretchedInFit5.crow | 16 +++++ 17 files changed, 168 insertions(+), 110 deletions(-) create mode 100644 Samples/common/ui/Interfaces/Stack/StretchedInFit2.crow create mode 100644 Samples/common/ui/Interfaces/Stack/StretchedInFit3.crow create mode 100644 Samples/common/ui/Interfaces/Stack/StretchedInFit4.crow create mode 100644 Samples/common/ui/Interfaces/Stack/StretchedInFit5.crow diff --git a/Crow/Default.style b/Crow/Default.style index 3d5c3e7f..8bc81ea6 100644 --- a/Crow/Default.style +++ b/Crow/Default.style @@ -10,12 +10,14 @@ IconSize = "11"; IconMargin = "1"; ToggleIconSize = "16"; -WindowBackgroundColor = ""; +WindowBackgroundColor = "DarkGrey"; WindowBorderColor = "Grey"; WindowBorderWidth = "1"; -WindowTitleBarBackground = "vgradient|0:Onyx|1:SteelBlue"; +WindowTitleBarBackground = "vgradient|0:Onyx|1:RoyalBlue"; WindowTitleBarForeground = "White"; +MenuBackground = "Jet"; + Button, CheckBox, RadioButton, ComboBox, Expandable, MessageBox, Popper, Slider, Spinner, TextBox { Focusable = "true"; @@ -77,23 +79,25 @@ TextBox { MouseCursor = "IBeam"; } Menu { - Margin = "1"; - Background = "vgradient|0:DimGrey|1:Black"; - //Background = "Transparent"; + Margin = "0"; + Background = "${MenuBackground}"; Height = "Fit"; Width = "Stretched"; VerticalAlignment = "Top"; SelectionBackground = "${ControlHighlight}"; + SelectionColoring = "false"; } MenuItem { Caption = "MenuItem"; Width = "Stretched"; Height = "Fit"; - Background = "DimGrey"; - Foreground = "LightGrey"; + Background = "${MenuBackground}"; + Foreground = "${ControlCaptionColor}"; MouseEnter = "{Background=${ControlHighlight}}"; - MouseLeave = "{Background=Transparent}"; - SelectionBackground = "${ControlHighlight}"; + MouseLeave = "{Background=${MenuBackground}}"; + //SelectionBackground = "${ControlHighlight}"; + SelectionBackground = "Transparent"; + SelectionColoring = "false"; } MessageBox { Background = "0.1,0.1,0.2,0.85"; diff --git a/Crow/Templates/FileDialog.template b/Crow/Templates/FileDialog.template index 419e093a..5140aae7 100644 --- a/Crow/Templates/FileDialog.template +++ b/Crow/Templates/FileDialog.template @@ -1,14 +1,10 @@  - + - + -