From 7016a68336cc659bc278d7d501d2103b5ce4ceaf Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Fri, 30 Dec 2011 20:40:19 +0000 Subject: [PATCH] [GB.REPORT] * BUG: Remove a really stupid bug. Now all seem to work fine git-svn-id: svn://localhost/gambas/trunk@4369 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.report/.src/ReportContainer.class | 10 +++++--- comp/src/gb.report/.src/Tests/Report8.class | 4 +-- comp/src/gb.report/.src/Tests/Report8.report | 25 +++++++++++-------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/comp/src/gb.report/.src/ReportContainer.class b/comp/src/gb.report/.src/ReportContainer.class index 9e844cdd6..1b9ede9e2 100644 --- a/comp/src/gb.report/.src/ReportContainer.class +++ b/comp/src/gb.report/.src/ReportContainer.class @@ -320,7 +320,7 @@ Private Function GetHSizeInt(AvailableW As Float, AvailableH As Float, TotalWidt fWidth += hChildHints.Width + fSpacing If fHeight < hChildHints.Height Then fHeight = hChildHints.Height Next - fWidth -= fSpacing + If fWidth Then fWidth -= fSpacing hMyHints.Height = fHeight + Me.Padding._Height + Me.Border._Top + Me.Border._bottom hMyHints.Width = fWidth + Me.Padding._Width + Me.Border._Left + Me.Border._Right Endif @@ -384,7 +384,7 @@ Private Function GetVSizeInt(AvailableW As Float, AvailableH As Float, TotalWidt Next 'on enlève le dernier espace - If fHeight > 0 Then fHeight -= fSpacing * 2 + If fHeight > 0 Then fHeight -= fSpacing 'bogue bizzard fHeight += 0.01 @@ -728,8 +728,10 @@ Private Sub SetVChildGeometry(X As Float, Y As Float, W As Float, H As Float, Co 'Endif 'Si on ne l'a pas déja compté comme fixé If Not hChild.Fixed And If Not hChild.Ignore Then - If (TH - hChildHints.Height) < 0 Then - ' Print "manque : " & (TH - hChildHints.Height) + If Me.Tag = "Boite 1" Then Print TH - hChildHints.Height + If (TH - hChildHints.Height) < 0 Or TH <= 0 Then + + Print "manque : " & (TH - hChildHints.Height) ' Print "sortie forcée, il reste : " & ((hchild._Count - 1) - j) hchild._DataIndex = j bExitLoop = True diff --git a/comp/src/gb.report/.src/Tests/Report8.class b/comp/src/gb.report/.src/Tests/Report8.class index def8b5826..a143d159c 100644 --- a/comp/src/gb.report/.src/Tests/Report8.class +++ b/comp/src/gb.report/.src/Tests/Report8.class @@ -4,10 +4,10 @@ Private $iA As Integer[] = [1, 2, 8, 4, 3, 5] Public Sub _new() - Report.Debug = True + 'Report.Debug = True ReportPanel1.DataCount = $iA.Count 'ReportHBox1.DataCount = 4 - ReportHBox1.Border.RoundCorner.TopRight = "5mm 5mm" + 'ReportHBox1.Border.RoundCorner.TopRight = "5mm 5mm" 'ReportHBox1.Border.RoundCorner.BottomRight = "5mm/5mm" End diff --git a/comp/src/gb.report/.src/Tests/Report8.report b/comp/src/gb.report/.src/Tests/Report8.report index c7c1839a3..a2a7c0353 100644 --- a/comp/src/gb.report/.src/Tests/Report8.report +++ b/comp/src/gb.report/.src/Tests/Report8.report @@ -5,37 +5,40 @@ Padding = ReportPadding["Top:2cm;Bottom:2cm;Left:2cm;Right:2cm"] Tag = "\"toto\"" Spacing = "1cm" - OnePiece = True Index = 0 Text = ("") { ReportPanel2 ReportVBox - #MoveScaled(3,3,65,50) + #MoveScaled(1,3,65,50) Expand = True Tag = "Boite 1" - Spacing = "2mm" + Spacing = "1cm" { ReportPanel1 ReportVBox - #MoveScaled(4,4,64,49) + #MoveScaled(1,3,64,45) Width = "4cm" - Height = "4cm" + Height = "5cm" AutoResize = True Tag = "Boite 2" + Spacing = "4mm" + OnePiece = True { ReportLabel2 ReportLabel #MoveScaled(2,1,54,8) Fixed = True AutoResize = True + Background = ReportBrush["#1FFF8F"] } { ReportHBox1 ReportHBox - #MoveScaled(6,6,64,31) + #MoveScaled(2,11,71,31) Width = "5cm" - Height = "1cm" + Height = "2cm" + Padding = ReportPadding["Left:1cm"] + AutoResize = True Tag = "Boite 3" - Border = ReportBorder["Top:1mm #000000;Bottom:1mm #000000;Left:1mm #000000;Right:1mm #000000"] { ReportLabel1 ReportLabel - #MoveScaled(-4,-8,62,4) - Font = Font["+5"] + #MoveScaled(5,5,47,17) + Padding = ReportPadding["Top:1mm;Bottom:1mm;Left:1mm;Right:1mm"] Expand = True AutoResize = True - Alignment = Align.Center + Background = ReportBrush["#DFDF6F"] } } }