mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 20:59:12 +02:00
revert r16293 #88af0e037f
git-svn-id: trunk@16298 -
This commit is contained in:
parent
6e2991d324
commit
cef06f6bb7
@ -1112,6 +1112,7 @@ type
|
||||
FOnPaint, FOnClick, FOnDblClick: TNotifyEvent;
|
||||
FOnMouseDown, FOnMouseUp: TMouseEvent;
|
||||
FOnMouseMove: TMouseMoveEvent;
|
||||
function GetCanvas: TCanvas;
|
||||
procedure SetHint(const AValue: string);
|
||||
procedure SetIcon(const AValue: TIcon);
|
||||
procedure SetVisible(Value: Boolean);
|
||||
@ -1132,6 +1133,7 @@ type
|
||||
property BalloonHint: string read FBalloonHint write FBalloonHint;
|
||||
property BalloonTimeout: Integer read FBalloonTimeout write FBalloonTimeout default 3000;
|
||||
property BalloonTitle: string read FBalloonTitle write FBalloonTitle;
|
||||
property Canvas: TCanvas read GetCanvas;
|
||||
property PopUpMenu: TPopupMenu read FPopUpMenu write FPopUpMenu;
|
||||
property Icon: TIcon read FIcon write SetIcon;
|
||||
property Hint: string read FHint write SetHint;
|
||||
|
@ -1171,7 +1171,6 @@ type
|
||||
procedure WriteData(Stream: TStream); override;
|
||||
procedure WriteStream(AStream: TMemoryStream); virtual; abstract;
|
||||
function RequestTransparentColor: TColor;
|
||||
property Canvas: TCanvas read GetCanvas;
|
||||
public
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
@ -1200,6 +1199,7 @@ type
|
||||
function ReleasePalette: HPALETTE;
|
||||
function CreateIntfImage: TLazIntfImage;
|
||||
public
|
||||
property Canvas: TCanvas read GetCanvas;
|
||||
function HandleAllocated: boolean;
|
||||
property BitmapHandle: HBITMAP read GetBitmapHandle write SetBitmapHandle;
|
||||
property Masked: Boolean read GetMasked write SetMasked;
|
||||
@ -1287,7 +1287,6 @@ type
|
||||
procedure SetHandles(ABitmap, AMask: HBITMAP); override;
|
||||
procedure SetSize(AWidth, AHeight: integer); override;
|
||||
|
||||
property Canvas;
|
||||
property Handle: HBITMAP read GetBitmapHandle write SetBitmapHandle; // for custombitmap handle = bitmaphandle
|
||||
property HandleType: TBitmapHandleType read GetHandleType write SetHandleType;
|
||||
property Monochrome: Boolean read GetMonochrome write SetMonochrome;
|
||||
|
@ -223,6 +223,22 @@ begin
|
||||
Result := TWSCustomTrayIconClass(WidgetSetClass).GetPosition(Self);
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* TCustomTrayIcon.GetCanvas ()
|
||||
*
|
||||
* DESCRIPTION: Getter method of the Canvas property
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURNS: The canvas of the underlaying Widgetset component
|
||||
*
|
||||
*******************************************************************}
|
||||
function TCustomTrayIcon.GetCanvas: TCanvas;
|
||||
begin
|
||||
//Result := Icon.Canvas;
|
||||
Result := TWSCustomTrayIconClass(WidgetSetClass).GetCanvas(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomTrayIcon.SetHint(const AValue: string);
|
||||
begin
|
||||
FHint := AValue;
|
||||
|
@ -230,7 +230,8 @@ var
|
||||
SrcDC: hDC;
|
||||
DestDC: hDC;
|
||||
begin
|
||||
if (DestRect.Right<=DestRect.Left) or (DestRect.Bottom<=DestRect.Top) or Empty
|
||||
if (DestRect.Right<=DestRect.Left) or (DestRect.Bottom<=DestRect.Top)
|
||||
or (Width=0) or (Height=0)
|
||||
then Exit;
|
||||
|
||||
BitmapHandleNeeded;
|
||||
|
@ -172,6 +172,7 @@ type
|
||||
class procedure InternalUpdate(const ATrayIcon: TCustomTrayIcon); virtual;
|
||||
class function ShowBalloonHint(const ATrayIcon: TCustomTrayIcon): Boolean; virtual;
|
||||
class function GetPosition(const ATrayIcon: TCustomTrayIcon): TPoint; virtual;
|
||||
class function GetCanvas(const ATrayIcon: TCustomTrayIcon): TCanvas; virtual;
|
||||
end;
|
||||
TWSCustomTrayIconClass = class of TWSCustomTrayIcon;
|
||||
|
||||
@ -332,6 +333,11 @@ begin
|
||||
Result := Point(0, 0);
|
||||
end;
|
||||
|
||||
class function TWSCustomTrayIcon.GetCanvas(const ATrayIcon: TCustomTrayIcon): TCanvas;
|
||||
begin
|
||||
Result := ATrayIcon.Icon.Canvas;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user