]> O.S.I.I.S - jp/crow.git/commitdiff
removed unnecessary test for bounds in measureRawSize
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 12 Sep 2015 15:48:17 +0000 (17:48 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 12 Sep 2015 15:48:17 +0000 (17:48 +0200)
src/GraphicObjects/Border.cs

index f2ce01e274e7d41144c951fbfe7d2706d8ca0f35..3f9772675e94e12f3c7f458ab32564ff27af469f 100644 (file)
@@ -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)
                {