You've already forked lazarus-ccr
GridPrinter: Set version number to 0.4 for next OPM release. Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8650 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="A package to simplify printing of string grids and other descendants of TCustomGrid. Contains also a print preview dialog, as well as standard actions."/>
|
||||
<License Value="Modified LGPL-2 (with linking exception, like LCL)."/>
|
||||
<Version Minor="3"/>
|
||||
<Version Minor="4"/>
|
||||
<Files Count="8">
|
||||
<Item1>
|
||||
<Filename Value="source\gridprnheaderfooterform.pas"/>
|
||||
|
@@ -552,7 +552,7 @@ end;
|
||||
function TGridPrnHeaderFooter.RealLineWidth: Integer;
|
||||
begin
|
||||
if FLineWidth <= 0 then
|
||||
Result := FOwner.ScaleY(1)
|
||||
Result := FOwner{%H-}.ScaleY(1)
|
||||
else
|
||||
Result := mm2px(FLineWidth/FOwner.PrintScaleFactor, FOwner.PixelsPerInchY);
|
||||
end;
|
||||
@@ -798,7 +798,7 @@ end;
|
||||
function TGridPrinter.GetBorderLineWidthHor: Integer;
|
||||
begin
|
||||
if FBorderLineWidth < 0.0 then
|
||||
Result := ScaleY(2)
|
||||
Result := {%H-}ScaleY(2)
|
||||
else
|
||||
Result := mm2px(FBorderLineWidth, FPixelsPerInchY);
|
||||
end;
|
||||
@@ -806,7 +806,7 @@ end;
|
||||
function TGridPrinter.GetBorderLineWidthVert: Integer;
|
||||
begin
|
||||
if FBorderLineWidth < 0.0 then
|
||||
Result := ScaleX(2)
|
||||
Result := {%H-}ScaleX(2)
|
||||
else
|
||||
Result := mm2px(FBorderLineWidth, FPixelsPerInchX);
|
||||
end;
|
||||
@@ -886,7 +886,7 @@ end;
|
||||
function TGridPrinter.GetFixedLineWidthHor: Integer;
|
||||
begin
|
||||
if FFixedLineWidth < 0.0 then
|
||||
Result := ScaleY(TGridAccess(FGrid).GridLineWidth)
|
||||
Result := {%H-}ScaleY(TGridAccess(FGrid).GridLineWidth)
|
||||
else
|
||||
Result := mm2px(FFixedLineWidth, FPixelsPerInchY);
|
||||
end;
|
||||
@@ -894,7 +894,7 @@ end;
|
||||
function TGridPrinter.GetFixedLineWidthVert: Integer;
|
||||
begin
|
||||
if FFixedLineWidth < 0.0 then
|
||||
Result := ScaleX(TGridAccess(FGrid).GridLineWidth)
|
||||
Result := {%H-}ScaleX(TGridAccess(FGrid).GridLineWidth)
|
||||
else
|
||||
Result := mm2px(FFixedLineWidth, FPixelsPerInchX);
|
||||
end;
|
||||
@@ -902,7 +902,7 @@ end;
|
||||
function TGridPrinter.GetGridLineWidthHor: Integer;
|
||||
begin
|
||||
if FGridLineWidth < 0.0 then
|
||||
Result := ScaleY(TGridAccess(FGrid).GridLineWidth)
|
||||
Result := {%H-}ScaleY(TGridAccess(FGrid).GridLineWidth)
|
||||
else
|
||||
Result := mm2px(FGridLineWidth, FPixelsPerInchY);
|
||||
end;
|
||||
@@ -910,7 +910,7 @@ end;
|
||||
function TGridPrinter.GetGridLineWidthVert: Integer;
|
||||
begin
|
||||
if FGridLineWidth < 0.0 then
|
||||
Result := ScaleX(TGridAccess(FGrid).GridLineWidth)
|
||||
Result := {%H-}ScaleX(TGridAccess(FGrid).GridLineWidth)
|
||||
else
|
||||
Result := mm2px(FGridLineWidth, FPixelsPerInchX);
|
||||
end;
|
||||
@@ -1034,7 +1034,7 @@ begin
|
||||
FHeaderMargin := mm2px(FMargins.Header, YDpi);
|
||||
FFooterMargin := mm2px(FMargins.Footer, YDpi);
|
||||
FPageRect := Rect(FLeftMargin, FTopMargin, APageWidth - FRightMargin, APageHeight - FBottomMargin);
|
||||
FPadding := ScaleX(varCellPadding);
|
||||
FPadding := {%H-}ScaleX(varCellPadding);
|
||||
|
||||
// Calculates column widths and row heights in the new pixel density units
|
||||
ScaleColWidths(FFactorX);
|
||||
@@ -1355,7 +1355,7 @@ var
|
||||
col: TGridColumn;
|
||||
lGrid: TGridAccess;
|
||||
checkedState: TCheckboxState;
|
||||
done: Boolean;
|
||||
done: Boolean = false;
|
||||
begin
|
||||
DoPrintCell(ACanvas, ACol, ARow, ARect, done);
|
||||
if done then
|
||||
@@ -1406,8 +1406,8 @@ begin
|
||||
// Determine size of checkbox
|
||||
details := ThemeServices.GetElementDetails(arrtb[ACheckState]);
|
||||
cSize := ThemeServices.GetDetailSize(Details);
|
||||
cSize.cx := ScaleX(cSize.cx);
|
||||
cSize.cy := ScaleY(cSize.cy);
|
||||
cSize.cx := {%H-}ScaleX(cSize.cx);
|
||||
cSize.cy := {%H-}ScaleY(cSize.cy);
|
||||
// Position the checkbox within the given rectangle, ARect.
|
||||
case ACanvas.TextStyle.Alignment of
|
||||
taLeftJustify: R.Left := ARect.Left + FPadding;
|
||||
@@ -1421,7 +1421,7 @@ begin
|
||||
end;
|
||||
R.BottomRight := Point(R.Left + cSize.cx, R.Top + cSize.cy);
|
||||
// Prepare pen and brush
|
||||
ACanvas.Pen.Width := ScaleX(1);
|
||||
ACanvas.Pen.Width := ScaleX(1){%H-};
|
||||
ACanvas.Pen.Color := clBlack;
|
||||
ACanvas.Pen.Style := psSolid;
|
||||
if ACheckState = cbGrayed then
|
||||
@@ -1437,7 +1437,7 @@ begin
|
||||
if ACheckState in [cbChecked, cbGrayed] then
|
||||
begin
|
||||
if ACheckState = cbGrayed then ACanvas.Pen.Color := clGray;
|
||||
ACanvas.Pen.Width := ScaleX(2);
|
||||
ACanvas.Pen.Width := ScaleX(2){%H-};
|
||||
P[0] := Point(R.Left + cSize.cx div 6, R.Top + cSize.cy div 2);
|
||||
P[1] := Point(R.Left + cSize.cx div 3, R.Bottom - cSize.cy div 6);
|
||||
P[2] := Point(R.Right - cSize.cx div 6, R.Top + cSize.cy div 6);
|
||||
|
@@ -150,7 +150,6 @@ end;
|
||||
|
||||
procedure TGridPrintPreviewAction.UpdateTarget(Target: TObject);
|
||||
var
|
||||
grid: TCustomGrid;
|
||||
prn: TGridPrinter;
|
||||
begin
|
||||
if HandlesTarget(Target) then
|
||||
|
@@ -237,6 +237,7 @@ begin
|
||||
Result := ACaption;
|
||||
end;
|
||||
|
||||
|
||||
{ TGridPrintPreviewForm }
|
||||
|
||||
constructor TGridPrintPreviewForm.Create(AOwner: TComponent);
|
||||
|
Reference in New Issue
Block a user