From 9ada7c687ba63c9a1fa6ba764d634b81c1a66a10 Mon Sep 17 00:00:00 2001 From: alexs75 Date: Fri, 18 Apr 2014 11:20:04 +0000 Subject: [PATCH] RxDateEdit - fix work with new ButtonEdit git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2943 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../images/componet_img/all_component_res.sh | 4 +-- .../componet_img/rx_lcl.res} | Bin 388 -> 572 bytes .../images/componet_img/rxbtn_downarrow.png | Bin 0 -> 124 bytes components/rx/trunk/rx.inc | 7 ++++- components/rx/trunk/rx_lcl.res | Bin 0 -> 572 bytes components/rx/trunk/rxlookup.pas | 5 ---- components/rx/trunk/rxnew.lpk | 8 ++++-- components/rx/trunk/tooledit.pas | 6 ++-- components/rx/trunk/vclutils.pas | 27 ++++++++++++++++-- 9 files changed, 42 insertions(+), 15 deletions(-) rename components/rx/trunk/{tooledit.res => images/componet_img/rx_lcl.res} (64%) create mode 100644 components/rx/trunk/images/componet_img/rxbtn_downarrow.png create mode 100644 components/rx/trunk/rx_lcl.res diff --git a/components/rx/trunk/images/componet_img/all_component_res.sh b/components/rx/trunk/images/componet_img/all_component_res.sh index ecd9c19a5..51b0f5a3c 100644 --- a/components/rx/trunk/images/componet_img/all_component_res.sh +++ b/components/rx/trunk/images/componet_img/all_component_res.sh @@ -3,8 +3,8 @@ rm rxdbgrid.lrs rm tooledit.res rm rxdbgrid.res -/usr/local/share/lazarus/tools/lazres tooledit.res picDateEdit.png /usr/local/share/lazarus/tools/lazres rxdbgrid.res rx_markerdown.png rx_markerup.png +/usr/local/share/lazarus/tools/lazres rx_lcl.res picDateEdit.png rxbtn_downarrow.png -../../../../tools\lazres.exe tooledit.lrs picDateEdit.bmp +#../../../../tools\lazres.exe tooledit.lrs picDateEdit.bmp #../../../../tools\lazres.exe rxdbgrid.lrs rx_markerdown.xpm rx_markerup.xpm diff --git a/components/rx/trunk/tooledit.res b/components/rx/trunk/images/componet_img/rx_lcl.res similarity index 64% rename from components/rx/trunk/tooledit.res rename to components/rx/trunk/images/componet_img/rx_lcl.res index c4e05c0d2d3adaa3036bdd8cb237ad2c2a941fed..7034a20a6a68bd37c21481c845750cd2270bb45d 100644 GIT binary patch delta 158 zcmZo+-ovt?g;BGHfq}sWi2wiRVhCc0U~pmxVen&!XK-QgX9x$f9D$-iAofH@wM=%P zLRJnoAlW(V+YKPaQtadz!T|&|94Q?@K4*bPWHAE+-w_aIoT|+y4HT5~ba4#fn3`~rOd diff --git a/components/rx/trunk/images/componet_img/rxbtn_downarrow.png b/components/rx/trunk/images/componet_img/rxbtn_downarrow.png new file mode 100644 index 0000000000000000000000000000000000000000..e534f8aed7a3834eae890294f7f67785f6f1b2e2 GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)Q!3HEdXMMW?q*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@a-J@ZAsjQ46Amy-Ec{ZRQ`F-jlfv5bLaT6QgDeBXBOzv{m*V-X PK$Q%hu6{1-oD!M)H;{X347|28cH9(#X5dZ(r#Sp|0!QjLY!r;dc&)~w~&kzn|IRZt4z-)*% z0Re>e&Hz7mUM?vvpa`$0hf5HUW(Q(c4mKd!IqTaEAjMMbF^& zyayCGT2>^{4kal#j_k={T65`}*!j6$lQu=3;94zx+@s}~PX14!NsqUm_+$C$^SnKuw2tcpZQ|c1 zD^~UE{=Pn-t*Rxi5hW>!C8<`)MX5lF!N|bSSl7T(*T^Eo(9+5jh>W!jOsotHqVM-7 mp=ij>PsvQHglaI;H8cq^GO{u;wKBGVXpp>qQ5>iN9>xG%hL^7Z literal 0 HcmV?d00001 diff --git a/components/rx/trunk/rxlookup.pas b/components/rx/trunk/rxlookup.pas index 5be1fb5e3..078737fb2 100644 --- a/components/rx/trunk/rxlookup.pas +++ b/components/rx/trunk/rxlookup.pas @@ -627,12 +627,7 @@ begin FLookupDataLink.FOnLayoutChanged:=@ListLinkActiveChanged; FLookupDataLink.FOnDataSetChanged:=@LookupDataSetChanged; - -// FDropDownCount:=8; FFieldList:=TStringList.Create; - P:=CreateArrowBitmap; - Glyph.Assign(P); - P.Free; ButtonWidth:=15; FPopUpFormOptions:=TPopUpFormOptions.Create(Self); end; diff --git a/components/rx/trunk/rxnew.lpk b/components/rx/trunk/rxnew.lpk index cee89b7bc..134c9882a 100644 --- a/components/rx/trunk/rxnew.lpk +++ b/components/rx/trunk/rxnew.lpk @@ -26,8 +26,8 @@ Copyright (c) 1998 Master-Bank translate to Lazarus by alexs in 2005 - 2014 "/> - - + + @@ -299,6 +299,10 @@ translate to Lazarus by alexs in 2005 - 2014 + + + + diff --git a/components/rx/trunk/tooledit.pas b/components/rx/trunk/tooledit.pas index 0cc6b0587..b0a00a93f 100644 --- a/components/rx/trunk/tooledit.pas +++ b/components/rx/trunk/tooledit.pas @@ -230,9 +230,9 @@ uses lclintf, LCLStrConsts, rxconst, rxstrutils, LResources, Forms, LCLProc, variants; -{$IFNDEF RX_USE_LAZARUS_RESOURCE} -{$R tooledit.res} -{$ENDIF} +{.$IFNDEF RX_USE_LAZARUS_RESOURCE} +{.$R tooledit.res} +{.$ENDIF} type TPopupCalendarAccess = class(TPopupCalendar) diff --git a/components/rx/trunk/vclutils.pas b/components/rx/trunk/vclutils.pas index 5c6eb065e..4ace277b0 100644 --- a/components/rx/trunk/vclutils.pas +++ b/components/rx/trunk/vclutils.pas @@ -104,6 +104,10 @@ procedure OutOfResources; implementation uses LCLProc, LCLIntf, LCLType, LCLStrConsts; +{$IFNDEF RX_USE_LAZARUS_RESOURCE} +{$R rx_lcl.res} +{$ENDIF} + function WidthOf(R: TRect): Integer; begin Result := R.Right - R.Left; @@ -600,10 +604,26 @@ end; {$ENDIF} function CreateArrowBitmap:TBitmap; +var + C : TCustomBitmap; begin + {$IFNDEF RX_USE_LAZARUS_RESOURCE} + Result := TBitmap.Create; + try + try + C := TPortableNetworkGraphic.Create; + C.LoadFromResourceName(hInstance, 'rxbtn_downarrow'); + Result.Assign(C); + finally + C.Free; + end; + except + Result.Free; + raise; + end; + {$ELSE} Result:=LoadLazResBitmapImage('rxbtn_downarrow') -{ Result:=Graphics.TBitmap.Create; - Result.LoadFromLazarusResource('rxbtn_downarrow');} + {$ENDIF} end; //Code from DBGrid @@ -650,10 +670,13 @@ begin end; initialization +{$IFDEF RX_USE_LAZARUS_RESOURCE} LazarusResources.Add('rxbtn_downarrow','XPM',[ '/* XPM */'#13#10'static char * btn_downarrow_xpm[] = {'#13#10'"5 3 2 1",'#13 +#10'" '#9'c None",'#13#10'".'#9'c #000000",'#13#10'".....",'#13#10'" ... ",' +#13#10'" . "};'#13#10]); +{$ENDIF} + end.