fix create resource from XPM image

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@490 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2008-06-24 15:19:56 +00:00
parent 9799c6d1c0
commit 00b3ba15a6
4 changed files with 27 additions and 4 deletions

View File

@ -1,3 +1,4 @@
+ fix create resource from XPM image
+ draw shadow on button image in TToolPanel
- Fix error in TDBComboBox.EditingDone if DataSet = nil
22.05.2008 - version 2.0.0.136 (svn revision 100)

View File

@ -1,3 +1,4 @@
 + Исправлено создание ресурсов из XPM файлов
+ Доработана отрисовка тени у кнопки на TToolPanel
- Исправлена ошибка в TDBComboBox.EditingDone; если не присвоен DataSet
22.05.2008 - версия 2.0.0.136 (svn revision 100)

View File

@ -1890,10 +1890,12 @@ begin
Options:=Options - [dgCancelOnExit];
{$ENDIF}
FMarkerUp := TBitmap.Create;
FMarkerUp := LoadLazResBitmapImage('rx_markerup');
FMarkerDown := LoadLazResBitmapImage('rx_markerdown');
{ FMarkerUp := TBitmap.Create;
FMarkerUp.LoadFromLazarusResource('rx_markerup');
FMarkerDown := TBitmap.Create;
FMarkerDown.LoadFromLazarusResource('rx_markerdown');
FMarkerDown.LoadFromLazarusResource('rx_markerdown');}
FPropertyStorageLink:=TPropertyStorageLink.Create;
FPropertyStorageLink.OnSave:=@OnIniSave;

View File

@ -29,6 +29,8 @@ procedure OutTextXY90(Canvas:TCanvas; X,Y:integer; Text:string; Orientation:TTex
function IsForegroundTask: Boolean;
function ValidParentForm(Control: TControl): TCustomForm;
function CreateArrowBitmap:TBitmap;
function LoadLazResBitmapImage(const ResName: string): TBitmap;
{
function AllocMemo(Size: Longint): Pointer;
function ReallocMemo(fpBlock: Pointer; Size: Longint): Pointer;
@ -512,8 +514,25 @@ end;
function CreateArrowBitmap:TBitmap;
begin
Result:=Graphics.TBitmap.Create;
Result.LoadFromLazarusResource('rxbtn_downarrow');
Result:=LoadLazResBitmapImage('rxbtn_downarrow')
{ Result:=Graphics.TBitmap.Create;
Result.LoadFromLazarusResource('rxbtn_downarrow');}
end;
//Code from DBGrid
function LoadLazResBitmapImage(const ResName: string): TBitmap;
var
C: TCustomBitmap;
begin
C := CreateBitmapFromLazarusResource(ResName);
if C<>nil then
begin
Result := TBitmap.Create;
Result.Assign(C);
C.Free;
end
else
Result:=nil;
end;
initialization