diff --git a/components/lazbarcodes/demo/main.lfm b/components/lazbarcodes/demo/main.lfm index e7d0afd9a..db83e33c1 100644 --- a/components/lazbarcodes/demo/main.lfm +++ b/components/lazbarcodes/demo/main.lfm @@ -436,12 +436,14 @@ object MainForm: TMainForm end end object btnSaveToFile: TBitBtn + AnchorSideLeft.Control = gbChecksum AnchorSideTop.Control = gbColors + AnchorSideRight.Control = btnCopyToClipboard AnchorSideRight.Side = asrBottom Left = 205 Height = 25 Top = 233 - Width = 128 + Width = 121 Anchors = [akTop, akLeft, akRight] AutoSize = True BorderSpacing.Top = 9 @@ -450,16 +452,14 @@ object MainForm: TMainForm TabOrder = 4 end object btnCopyToClipboard: TBitBtn - AnchorSideLeft.Control = btnSaveToFile + AnchorSideLeft.Control = gbChecksum AnchorSideTop.Control = btnSaveToFile AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = btnSaveToFile AnchorSideRight.Side = asrBottom Left = 205 Height = 25 Top = 264 - Width = 128 - Anchors = [akTop, akLeft, akRight] + Width = 121 AutoSize = True BorderSpacing.Top = 6 Caption = 'Copy to clipboard' @@ -488,7 +488,7 @@ object MainForm: TMainForm Height = 293 Top = 35 Width = 152 - PageIndex = 2 + PageIndex = 0 BorderSpacing.Left = 16 TabOrder = 7 object pgOptions_QR: TPage diff --git a/components/lazbarcodes/images/tbarcodedatamatrix.png b/components/lazbarcodes/images/tbarcodedatamatrix.png index 691147887..5286c6841 100644 Binary files a/components/lazbarcodes/images/tbarcodedatamatrix.png and b/components/lazbarcodes/images/tbarcodedatamatrix.png differ diff --git a/components/lazbarcodes/images/tbarcodepdf417_150.png b/components/lazbarcodes/images/tbarcodepdf417_150.png index 5e27b707e..a4670f62e 100644 Binary files a/components/lazbarcodes/images/tbarcodepdf417_150.png and b/components/lazbarcodes/images/tbarcodepdf417_150.png differ diff --git a/components/lazbarcodes/src/lazbarcodes_icons.res b/components/lazbarcodes/src/lazbarcodes_icons.res index b1c1eb40e..45c3b6a04 100644 Binary files a/components/lazbarcodes/src/lazbarcodes_icons.res and b/components/lazbarcodes/src/lazbarcodes_icons.res differ diff --git a/components/lazbarcodes/src/ubarcodes.pas b/components/lazbarcodes/src/ubarcodes.pas index 30eb7f5ba..0e8a25e90 100644 --- a/components/lazbarcodes/src/ubarcodes.pas +++ b/components/lazbarcodes/src/ubarcodes.pas @@ -3027,12 +3027,17 @@ end; pixels} function TBarcodeSquare.CalcFactor(AWidth, AHeight: Integer): Integer; begin - if AWidth > AHeight then - Result := AHeight div FSymbol^.Width + if FSymbol^.Width = 0 then + Result := 1 else - Result := AWidth div FSymbol^.Width; - if Result = 0 then - Result := 1; + begin + if AWidth > AHeight then + Result := AHeight div FSymbol^.Width + else + Result := AWidth div FSymbol^.Width; + if Result = 0 then + Result := 1; + end; end; { Calculates scaled size parameters for the barcode. }