mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 18:20:34 +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;
|
r : NSRect;
|
||||||
rr : NSRect;
|
rr : NSRect;
|
||||||
dr : TRect;
|
dr : TRect;
|
||||||
|
t : NSString;
|
||||||
begin
|
begin
|
||||||
|
if isOwnerDrawn then
|
||||||
|
begin
|
||||||
|
t := title;
|
||||||
|
if Assigned(t) then t.retain;
|
||||||
|
setTitle(NSString.string_);
|
||||||
|
end else
|
||||||
|
t := nil;
|
||||||
|
|
||||||
inherited drawRect(dirtyRect);
|
inherited drawRect(dirtyRect);
|
||||||
|
|
||||||
|
if Assigned(t) then
|
||||||
|
begin
|
||||||
|
setTitle(t);
|
||||||
|
t.release;
|
||||||
|
end;
|
||||||
|
|
||||||
// if ownerDrawn style, then need to call "DrawItem" event
|
// if ownerDrawn style, then need to call "DrawItem" event
|
||||||
if isOwnerDrawn and Assigned(callback)
|
if isOwnerDrawn and Assigned(callback)
|
||||||
and (lastSelectedItemIndex>=0) and (lastSelectedItemIndex<list.Count)
|
and (lastSelectedItemIndex>=0) and (lastSelectedItemIndex<list.Count)
|
||||||
|
Loading…
Reference in New Issue
Block a user