mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 18:36:02 +02:00
lcl:
- register more picture extensions (.cur, .icns) - add simple implementation to TCustomIcon.UpdateCurrentView git-svn-id: trunk@15613 -
This commit is contained in:
parent
145033569a
commit
93c931063d
@ -712,6 +712,8 @@ end;
|
||||
procedure TCustomIcon.UpdateCurrentView;
|
||||
begin
|
||||
{$IFDEF VerboseLCLTodos}{$note implement me}{$ENDIF}
|
||||
FreeCanvasContext;
|
||||
Changed(Self);
|
||||
end;
|
||||
|
||||
function TCustomIcon.UpdateHandles(ABitmap, AMask: HBITMAP): Boolean;
|
||||
|
@ -51,7 +51,9 @@ begin
|
||||
Add('pbm', rsPortableBitmap, TPortableAnyMapGraphic);
|
||||
Add('pgm', rsPortableGrayMap, TPortableAnyMapGraphic);
|
||||
Add('ppm', rsPortablePixmap, TPortableAnyMapGraphic);
|
||||
Add('ico', rsIcon, TCustomIcon);
|
||||
Add('ico', rsIcon, TIcon);
|
||||
Add('icns', rsIcns, TIcnsIcon);
|
||||
Add('cur', rsCursor, TCursorImage);
|
||||
Add('jpg', rsJpeg, TJpegImage);
|
||||
end;
|
||||
|
||||
@ -432,9 +434,10 @@ var
|
||||
begin
|
||||
if (Value=FGraphic) then exit;
|
||||
NewGraphic := nil;
|
||||
ok:=false;
|
||||
ok := False;
|
||||
try
|
||||
if Value <> nil then begin
|
||||
if Value <> nil then
|
||||
begin
|
||||
NewGraphic := TGraphicClass(Value.ClassType).Create;
|
||||
NewGraphic.Assign(Value);
|
||||
NewGraphic.OnChange := @Changed;
|
||||
@ -443,7 +446,7 @@ begin
|
||||
FGraphic.Free;
|
||||
FGraphic := NewGraphic;
|
||||
Changed(Self);
|
||||
ok:=true;
|
||||
ok := True;
|
||||
finally
|
||||
// this try..finally construction will in case of an exception
|
||||
// not alter the error backtrace output
|
||||
|
@ -185,6 +185,8 @@ ResourceString
|
||||
rsPortableGrayMap = 'Portable GrayMap';
|
||||
rsPortablePixmap = 'Portable PixMap';
|
||||
rsIcon = 'Icon';
|
||||
rsIcns = 'OSX Icon Resource';
|
||||
rsCursor = 'Cursor';
|
||||
rsJpeg = 'Joint Picture Expert Group';
|
||||
rsUnsupportedClipboardFormat = 'Unsupported clipboard format: %s';
|
||||
rsGroupIndexCannotBeLessThanPrevious = 'GroupIndex cannot be less than a '
|
||||
|
Loading…
Reference in New Issue
Block a user