mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 09:38:12 +02:00
cocoa: hidding the text title for ownerdrawn controls
This commit is contained in:
parent
26930d85c6
commit
49bb85a7ba
@ -1643,9 +1643,24 @@ var
|
||||
r : NSRect;
|
||||
rr : NSRect;
|
||||
dr : TRect;
|
||||
t : NSString;
|
||||
begin
|
||||
if isOwnerDrawn then
|
||||
begin
|
||||
t := title;
|
||||
if Assigned(t) then t.retain;
|
||||
setTitle(NSString.string_);
|
||||
end else
|
||||
t := nil;
|
||||
|
||||
inherited drawRect(dirtyRect);
|
||||
|
||||
if Assigned(t) then
|
||||
begin
|
||||
setTitle(t);
|
||||
t.release;
|
||||
end;
|
||||
|
||||
// if ownerDrawn style, then need to call "DrawItem" event
|
||||
if isOwnerDrawn and Assigned(callback)
|
||||
and (lastSelectedItemIndex>=0) and (lastSelectedItemIndex<list.Count)
|
||||
|
Loading…
Reference in New Issue
Block a user