diff --git a/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.class b/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.class index 92224ce0e..caa9d13c4 100644 --- a/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.class +++ b/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.class @@ -295,9 +295,27 @@ Public Sub chkSynchro_Click() Dim hCtrl As Control - For Each hCtrl In [crdBottom, crdLeft, crdRight, btnBottom, btnLeft, btnRight] - hCtrl.Enabled = chkSynchro.Value = False + For Each hCtrl In panBorder.Children + If hCtrl Is CoordBox Or If hCtrl Is Button Then + If InStr(hCtrl.Name, "Top") Then Continue + hCtrl.Enabled = chkSynchro.Value = False + Endif Next + + For Each hCtrl In panCorner.Children + If hCtrl Is CoordBox Or If hCtrl Is CheckBox Then + If InStr(hCtrl.Name, "TopLeft") Then Continue + hCtrl.Enabled = chkSynchro.Value = False + Endif + Next + + If chkSynchro.Value = False Then + crdTopLeft2.Enabled = chkTopLeft.Value = False + crdTopRight2.Enabled = chkTopRight.Value = False + crdBottomLeft2.Enabled = chkBottomLeft.Value = False + crdBottomRight2.Enabled = chkBottomRight.Value = False + Endif + dwgBorder.Refresh End diff --git a/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.form b/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.form index 0c5001b2e..cdee23eee 100644 --- a/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.form +++ b/app/src/gambas3/.src/Dialog/Report/FReportBorderChooser.form @@ -5,12 +5,12 @@ Text = ("Configure border") Resizable = False { btnCancel Button - MoveScaled(60,27,16,4) + MoveScaled(62,27,16,4) Text = ("Cancel") Cancel = True } { btnOK Button - MoveScaled(43,27,16,4) + MoveScaled(45,27,16,4) Text = ("OK") Default = True } @@ -29,8 +29,8 @@ Count = 2 Index = 0 Text = ("Border") - { Panel1 Panel - MoveScaled(1,1,34,20) + { panBorder Panel + MoveScaled(1,1,34,19) { crdBottom CoordBox crdBrush Name = "crdBottom" MoveScaled(9,15,18,4) @@ -90,8 +90,8 @@ } Index = 1 Text = ("Corner") - { Panel2 Panel - MoveScaled(1,1,48,20) + { panCorner Panel + MoveScaled(1,1,47,19) { Label2 Label MoveScaled(0,5,9,4) Text = ("TopRight") diff --git a/comp/src/gb.report/.project b/comp/src/gb.report/.project index 552327d7b..413ac3a79 100644 --- a/comp/src/gb.report/.project +++ b/comp/src/gb.report/.project @@ -1,7 +1,7 @@ # Gambas Project File 3.0 # Compiled with Gambas 2.99.6 Title=Report designer -Startup=myReport2 +Startup=myReport1 Icon=printer1.png Version=2.99.6 VersionProgram=gbx3 -V @@ -11,7 +11,7 @@ Component=gb.form Component=gb.db Description="Report engine for gambas" Authors="Fabien Bodard" -Environment="GB_GUI=gb.gtk" +Environment="GB_GUI=gb.qt4" TabSize=2 Translate=1 Language=fr diff --git a/gb.qt4/src/cpaint_impl.cpp b/gb.qt4/src/cpaint_impl.cpp index 5fefc05d2..9531c8713 100644 --- a/gb.qt4/src/cpaint_impl.cpp +++ b/gb.qt4/src/cpaint_impl.cpp @@ -92,6 +92,10 @@ static bool init_painting(GB_PAINT *d, QPaintDevice *device) EXTRA(d)->path = 0; EXTRA(d)->clip = 0; + + EXTRA(d)->init = new QTransform(); + *(EXTRA(d)->init) = PAINTER(d)->worldTransform(); + PAINTER(d)->setRenderHints(QPainter::Antialiasing, true); PAINTER(d)->setRenderHints(QPainter::TextAntialiasing, true); PAINTER(d)->setRenderHints(QPainter::SmoothPixmapTransform, true); @@ -224,6 +228,7 @@ static void End(GB_PAINT *d) delete dx->clipStack; } + delete dx->init; delete dx->path; delete dx->clip; delete dx->painter; @@ -793,7 +798,7 @@ static void Matrix(GB_PAINT *d, int set, GB_TRANSFORM matrix) if (t) PAINTER(d)->setWorldTransform(*t); else - PAINTER(d)->resetTransform(); + PAINTER(d)->setWorldTransform(*EXTRA(d)->init); } else *t = PAINTER(d)->worldTransform(); diff --git a/gb.qt4/src/cprinter.cpp b/gb.qt4/src/cprinter.cpp index d285b74d3..7734a44ef 100644 --- a/gb.qt4/src/cprinter.cpp +++ b/gb.qt4/src/cprinter.cpp @@ -295,7 +295,7 @@ BEGIN_PROPERTY(Printer_PaperWidth) QSizeF size = PRINTER->paperSize(QPrinter::Millimeter); if (READ_PROPERTY) - GB.ReturnFloat(size.width()); + GB.ReturnFloat(floor((double)size.width() * 1E6) / 1E6); else { size.setWidth((qreal)VPROP(GB_FLOAT)); @@ -309,7 +309,7 @@ BEGIN_PROPERTY(Printer_PaperHeight) QSizeF size = PRINTER->paperSize(QPrinter::Millimeter); if (READ_PROPERTY) - GB.ReturnFloat(size.height()); + GB.ReturnFloat(floor((double)size.height() * 1E6) / 1E6); else { size.setHeight((qreal)VPROP(GB_FLOAT)); diff --git a/gb.qt4/src/gb.qt.h b/gb.qt4/src/gb.qt.h index b15abfe9b..30f7b7cda 100644 --- a/gb.qt4/src/gb.qt.h +++ b/gb.qt4/src/gb.qt.h @@ -40,6 +40,7 @@ #include #include #include +#include #define QT_INTERFACE_VERSION 1 @@ -109,6 +110,7 @@ typedef QPainterPath *clip; int fillRule; QList *clipStack; + QTransform *init; } QT_PAINT_EXTRA;