From: jpbruyere Date: Thu, 25 Feb 2016 13:51:07 +0000 (+0100) Subject: debug X-Git-Tag: v0.4~121 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=3cb3ae624a352b92b71a5d7cb19c05f0183f2e43;p=jp%2Fcrow.git debug --- diff --git a/Crow.csproj b/Crow.csproj index fb12b57d..146ffd1a 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -240,6 +240,7 @@ + diff --git a/Styles/Expandable.style b/Styles/Expandable.style index 536e13dd..a5be8e2a 100644 --- a/Styles/Expandable.style +++ b/Styles/Expandable.style @@ -1,2 +1,2 @@ Focusable = true -Background = DimGray +Height = -1 diff --git a/Styles/GroupBox.style b/Styles/GroupBox.style index 536e13dd..c65238fb 100644 --- a/Styles/GroupBox.style +++ b/Styles/GroupBox.style @@ -1,2 +1,2 @@ -Focusable = true -Background = DimGray + + diff --git a/Styles/Label.style b/Styles/Label.style new file mode 100644 index 00000000..d5b41383 --- /dev/null +++ b/Styles/Label.style @@ -0,0 +1 @@ +Fit = true diff --git a/Templates/GroupBox.goml b/Templates/GroupBox.goml index 5b042429..b00af82d 100755 --- a/Templates/GroupBox.goml +++ b/Templates/GroupBox.goml @@ -2,7 +2,7 @@ - diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index e8453937..be2bf0e7 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -790,10 +790,7 @@ namespace Crow if (Width > 0) Slot.Width = Width; else if (Width < 0) { - int tmp = measureRawSize (LayoutingType.Width); - if (tmp < 0) - return false; - Slot.Width = tmp; + Slot.Width = measureRawSize (LayoutingType.Width); }else if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Width)) return false; else @@ -818,10 +815,7 @@ namespace Crow if (Height > 0) Slot.Height = Height; else if (Height < 0){ - int tmp = measureRawSize (LayoutingType.Height); - if (tmp < 0) - return false; - Slot.Height = tmp; + Slot.Height = measureRawSize (LayoutingType.Height); }else if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Height)) return false; else diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index 6e2417a9..887d9e22 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Xml.Serialization; using Cairo; using OpenTK.Input; +using System.Diagnostics; namespace Crow @@ -217,6 +218,9 @@ namespace Crow maxChildrenHeight = 0; } void searchLargestChild(){ + #if DEBUG_LAYOUTING + Debug.WriteLine("\tSearch largest child"); + #endif largestChild = null; maxChildrenWidth = 0; for (int i = 0; i < Children.Count; i++) { @@ -231,6 +235,9 @@ namespace Crow } } void searchTallestChild(){ + #if DEBUG_LAYOUTING + Debug.WriteLine("\tSearch tallest child"); + #endif tallestChild = null; maxChildrenHeight = 0; for (int i = 0; i < Children.Count; i++) { diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs index ad6549a1..6782e259 100644 --- a/src/GraphicObjects/Label.cs +++ b/src/GraphicObjects/Label.cs @@ -12,6 +12,7 @@ using OpenTK.Input; namespace Crow { [Serializable] + [DefaultStyle("#Crow.Styles.Label.style")] public class Label : GraphicObject { #region CTOR @@ -308,17 +309,6 @@ namespace Crow NotifyValueChanged ("Text", Text); } #region GraphicObject overrides - [XmlAttributeAttribute()][DefaultValue(-1)] - public override int Width { - get { return base.Width; } - set { base.Width = value; } - } - [XmlAttributeAttribute()][DefaultValue(-1)] - public override int Height { - get { return base.Height; } - set { base.Height = value; } - } - protected override int measureRawSize(LayoutingType lt) { if (lines == null)