diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-25 14:51:07 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-25 14:51:07 +0100 |
| commit | 3cb3ae624a352b92b71a5d7cb19c05f0183f2e43 (patch) | |
| tree | 930d78bb995fda31091e420aefc0d05128d3eea8 /src | |
| parent | 54ff9d82e0d195bc335916b8a30a27651f830502 (diff) | |
debug
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 10 | ||||
| -rw-r--r-- | src/GraphicObjects/Group.cs | 7 | ||||
| -rw-r--r-- | src/GraphicObjects/Label.cs | 12 |
3 files changed, 10 insertions, 19 deletions
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) |