From: jpbruyere Date: Sat, 12 Sep 2015 15:48:17 +0000 (+0200) Subject: removed unnecessary test for bounds in measureRawSize X-Git-Tag: 0.2~37 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=4e90f77177af11a9b20b228d774ff37360a22e2f;p=jp%2Fcrow.git removed unnecessary test for bounds in measureRawSize --- diff --git a/src/GraphicObjects/Border.cs b/src/GraphicObjects/Border.cs index f2ce01e2..3f977267 100644 --- a/src/GraphicObjects/Border.cs +++ b/src/GraphicObjects/Border.cs @@ -45,16 +45,7 @@ namespace go protected override Size measureRawSize () { - Size raw = Bounds.Size; - - if (Child != null) { - if (Bounds.Width < 0) - raw.Width = Child.Slot.Width + 2 * (Margin+BorderWidth); - if (Bounds.Height < 0) - raw.Height = Child.Slot.Height + 2 * (Margin+BorderWidth); - } - - return raw; + return child == null ? Bounds.Size : child.Slot.Size + 2 * (Margin + BorderWidth); } protected override void onDraw (Cairo.Context gr) {