From 28b37c39eb60d62dcc7a093a6a22f16239778b6e Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Sat, 31 Dec 2011 00:21:24 +0000 Subject: [PATCH] [GB.REPORT] * BUG: Use the current Painting Resolution to calculate the size of a text git-svn-id: svn://localhost/gambas/trunk@4378 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.report/.src/ReportLabel.class | 2 +- comp/src/gb.report/.src/Tests/Report8.report | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/comp/src/gb.report/.src/ReportLabel.class b/comp/src/gb.report/.src/ReportLabel.class index a844cbbb6..af4f9734a 100644 --- a/comp/src/gb.report/.src/ReportLabel.class +++ b/comp/src/gb.report/.src/ReportLabel.class @@ -76,7 +76,7 @@ Public Sub _GetSizeHints(AvailableW As Float, AvailableH As Float, TotalWidth As Endif If $fAngle = 0.0 Then hExt = Paint.TextExtents(sText) - fTextWidth = Me.Padding._Left + Me.Border._Left + MTools.PixelsToUnits(hExt.Width) + Me.Padding._Right + Me.Border._Right + fTextWidth = Me.Padding._Left + Me.Border._Left + MTools.PixelsToUnitspaint(hExt.Width) + Me.Padding._Right + Me.Border._Right fTextHeight = MTools.PixelsToUnitsPaint(Paint.Font.Height) + Me.Padding._Top + Me.Padding._Bottom + Me.Border._Top + Me.Border._Bottom 'Debug Paint.Font.Height * Paint.ResolutionX / Desktop.Resolution diff --git a/comp/src/gb.report/.src/Tests/Report8.report b/comp/src/gb.report/.src/Tests/Report8.report index 37f749421..7160793eb 100644 --- a/comp/src/gb.report/.src/Tests/Report8.report +++ b/comp/src/gb.report/.src/Tests/Report8.report @@ -55,7 +55,6 @@ #MoveScaled(5,5,47,17) Font = Font["+1"] Padding = ReportPadding["Top:1mm;Bottom:1mm;Left:1mm;Right:1mm"] - Expand = True AutoResize = True Background = ReportBrush["#DFDF6F"] }