diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-12 17:48:17 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-12 17:48:17 +0200 |
| commit | 4e90f77177af11a9b20b228d774ff37360a22e2f (patch) | |
| tree | 8c07fded665237e9cab04483184b2565df1eef7a /src/GraphicObjects | |
| parent | a876fd8c161b29418243c671260b59bc7f8742ae (diff) | |
removed unnecessary test for bounds in measureRawSize
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/Border.cs | 11 |
1 files changed, 1 insertions, 10 deletions
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) { |