diff --git a/.gitattributes b/.gitattributes index 6dfc180207..82fb62ebdf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1948,11 +1948,14 @@ components/lazreport/doc/tutorials/stringgrid/en/Tutorial_en.odt -text components/lazreport/doc/tutorials/stringgrid/es/Tutorial[!!-~]LazReport[!!-~]y[!!-~]StringGrid.pdf -text svneol=unset#application/pdf components/lazreport/doc/tutorials/stringgrid/es/Tutorial_es.odt -text components/lazreport/images/Package_images.txt svneol=native#text/plain +components/lazreport/images/bitmaps/bulletgray.png -text +components/lazreport/images/bitmaps/bulletgreen.png -text components/lazreport/images/bitmaps/fr_bold.bmp -text components/lazreport/images/bitmaps/fr_check.bmp -text components/lazreport/images/bitmaps/fr_checkbox.bmp -text components/lazreport/images/bitmaps/fr_hightlight.bmp -text components/lazreport/images/bitmaps/fr_italic.bmp -text +components/lazreport/images/bitmaps/fr_pencil.cur -text components/lazreport/images/bitmaps/fr_radio.bmp -text components/lazreport/images/bitmaps/fr_script.bmp -text components/lazreport/images/bitmaps/fr_undrline.bmp -text @@ -2213,8 +2216,9 @@ components/lazreport/source/addons/pdfexport/lr_pdfexp_reg.res -text components/lazreport/source/addons/pdfexport/readme.txt svneol=native#text/plain components/lazreport/source/addons/pdfexport/tfrtnpdfexport.png -text svneol=unset#image/png components/lazreport/source/barcode.pas svneol=native#text/pascal -components/lazreport/source/bullets.lrs svneol=native#text/plain +components/lazreport/source/bullets.res -text components/lazreport/source/fr_pencil.lrs svneol=native#text/pascal +components/lazreport/source/fr_pencil.res -text components/lazreport/source/languages/lr_const.cs.po svneol=native#text/plain components/lazreport/source/languages/lr_const.de.po svneol=native#text/plain components/lazreport/source/languages/lr_const.es.po svneol=native#text/plain diff --git a/components/lazreport/images/bitmaps/bulletgray.png b/components/lazreport/images/bitmaps/bulletgray.png new file mode 100644 index 0000000000..fde5c8663e Binary files /dev/null and b/components/lazreport/images/bitmaps/bulletgray.png differ diff --git a/components/lazreport/images/bitmaps/bulletgreen.png b/components/lazreport/images/bitmaps/bulletgreen.png new file mode 100644 index 0000000000..0e7490c5fd Binary files /dev/null and b/components/lazreport/images/bitmaps/bulletgreen.png differ diff --git a/components/lazreport/images/bitmaps/fr_pencil.cur b/components/lazreport/images/bitmaps/fr_pencil.cur new file mode 100644 index 0000000000..40de99ccb0 Binary files /dev/null and b/components/lazreport/images/bitmaps/fr_pencil.cur differ diff --git a/components/lazreport/images/package_images.bat b/components/lazreport/images/package_images.bat index 152a4591a0..1d3fcfea9d 100644 --- a/components/lazreport/images/package_images.bat +++ b/components/lazreport/images/package_images.bat @@ -1,2 +1,3 @@ ..\..\..\tools\lazres ..\source\lr_register.res @Package_images.txt +..\..\..\tools\lazres ..\source\bullets.res bitmaps\bulletgray.png bitmaps\bulletgreen.png pause diff --git a/components/lazreport/source/bullets.lrs b/components/lazreport/source/bullets.lrs deleted file mode 100644 index 235f8eb1a0..0000000000 --- a/components/lazreport/source/bullets.lrs +++ /dev/null @@ -1,28 +0,0 @@ -LazarusResources.Add('bulletgreen','PNG',[ - #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#9#0#0#0#9#8#6#0#0#0#224#145#6#16#0 - +#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#11'S'#0#0#11'S'#1#255#187 - +#217'q'#0#0#0#25'tEXtSoftware'#0'www.inkscape.org'#155#238'<'#26#0#0#0#183'I' - +'DAT'#24#149#141#144'1n'#194'@'#20#5'g'#223'zm%'#184'!'#200#18'e'#148#18'!!N' - +#128'\'#194'9r'#172#20'9'#5#148'>'#2#13'J'#153#11'8I'#133#165#224#197#127'S' - +#132#6#137#130#169#167'x'#243'\J'#137#205#206#21'?'#7#189#17']m'#131'U'#242 - +'j'#9#169'y'#154#219#235'v'#157'Nn'#189#165#248#222#235#3#217'K(A9X'#15#241#8 - +#152'>''K'#155#249#201'B'#239'`'#171#199')'#20'c'#200#30' '#148#224#11#136']' - +#26#255'~'#233'YDW'#135#18#178#17'Wd'#163#127#153#232'j'#217'`'#149'rn'#162 - +#28'l'#176'J'#242'j'#173#191'-Y'#15#242'jEHM<'#194#185#187#22#206#221'e|H' - +#205']u'#238#158#159#254#0'3'#224']'#159#138#200'4-'#0#0#0#0'IEND'#174'B`' - +#130 -]); -LazarusResources.Add('bulletgray','PNG',[ - #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#9#0#0#0#9#8#6#0#0#0#224#145#6#16#0 - +#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#11'S'#0#0#11'S'#1#255#187 - +#217'q'#0#0#0#25'tEXtSoftware'#0'www.inkscape.org'#155#238'<'#26#0#0#0#205'I' - +'DAT'#24#149#141#208'Aj'#132'@'#16#133#225#167#180'e'#131'T'#13#4#17#2#194'l' - +#250#12#227'b'#238#144#220'&wHn'#147';$'#11#231#12#189#9#12#4#26#9'L7'#130 - +#150#130'Ye1'#224'"'#255#250#219#188#151'm'#219#134#207#183'g'#158#201#245#3 - +'5n4\TkZj'#13#190'T'#223#157'_'#222'S'#246#241#250#196#223#213')L'#135#163#21 - +#17#16#17'T'#21'1F'#216#219#215#244'8^'#26'3'#147#235#167#195#209#182'm'#11 - +'f'#198'_"'#130'+`'#231#229#167#207#7'j'#156#136#220#1#0'`f'#136#8#6'j\>'#26 - +'.'#136#8'{'#17#17'F'#195'E^'#173'iQ'#213']'#164#170#168#214#180#228#181#6#31 - +'cDJ'#233#14#164#148#16'cD'#173#193#155'R}go'#15#225#10#236#174'+'#213'w'#217 - +#127'~'#250#5#144#219'o'#231#195#12'\'#151#0#0#0#0'IEND'#174'B`'#130 -]); diff --git a/components/lazreport/source/bullets.res b/components/lazreport/source/bullets.res new file mode 100644 index 0000000000..3a51ef1115 Binary files /dev/null and b/components/lazreport/source/bullets.res differ diff --git a/components/lazreport/source/fr_pencil.res b/components/lazreport/source/fr_pencil.res new file mode 100644 index 0000000000..51a28986b1 Binary files /dev/null and b/components/lazreport/source/fr_pencil.res differ diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 02727b2a54..2c01da5eab 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -1948,8 +1948,7 @@ end; constructor TfrNonVisualControl.Create(AOwnerPage: TfrPage); begin inherited Create(AOwnerPage); - ControlImage := TBitmap.Create; - ControlImage.LoadFromLazarusResource(ClassName); + ControlImage := CreateBitmapFromLazarusResource(HInstance, ClassName); dx := 28; dy := 28; end; diff --git a/components/lazreport/source/lr_desgn.pas b/components/lazreport/source/lr_desgn.pas index 055a623036..f71ff68aad 100644 --- a/components/lazreport/source/lr_desgn.pas +++ b/components/lazreport/source/lr_desgn.pas @@ -655,6 +655,8 @@ var implementation {$R *.lfm} +{$R bullets.res} +{$R fr_pencil.res} uses LR_Pgopt, LR_GEdit, LR_Templ, LR_Newrp, LR_DsOpt, LR_Const, @@ -723,8 +725,8 @@ begin fOwner := AOwner; fGreenBullet := TPortableNetworkGraphic.Create; fGrayBullet := TPortableNetworkGraphic.Create; - fGreenBullet.LoadFromLazarusResource('bulletgreen'); - fGrayBullet.LoadFromLazarusResource('bulletgray'); + fGreenBullet.LoadFromResourceName(HInstance, 'bulletgreen'); + fGrayBullet.LoadFromResourceName(HInstance, 'bulletgray'); end; destructor TPaintSel.Destroy; @@ -3344,8 +3346,16 @@ begin end; procedure TfrDesignerForm.FormShow(Sender: TObject); +var + CursorImage: TCursorImage; begin - Screen.Cursors[crPencil] := LoadCursorFromLazarusREsource('FR_PENCIL'); + CursorImage := TCursorImage.Create; + try + CursorImage.LoadFromResourceName(hInstance, 'FR_PENCIL'); + Screen.Cursors[crPencil] := CursorImage.ReleaseHandle; + finally + CursorImage.Free; + end; {$ifndef sbod} Panel7.Hide; {$endif} @@ -7554,10 +7564,6 @@ begin end; initialization - - {$I fr_pencil.lrs} - {$I bullets.lrs} - frDesigner:=nil; ProcedureInitDesigner:=@InitGlobalDesigner;