mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-09 21:59:23 +02:00
cocoa: making togglebox consistent with the standard button. Providing configuration to make the cocoa run in backwards compatible manner
git-svn-id: trunk@62250 -
This commit is contained in:
parent
3f71fbb081
commit
e4c13cf957
@ -242,6 +242,8 @@ var
|
||||
// if set to true, then WS would not assign icons via TCocoaWSForm SetIcon
|
||||
// The icon would have to be changed manually. By default LCL behaviour is used
|
||||
CocoaIconUse: Boolean = false;
|
||||
CocoaToggleBezel : NSBezelStyle = NSRoundedBezelStyle;
|
||||
CocoaToggleType : NSButtonType = NSPushOnPushOffButton;
|
||||
|
||||
{$ifdef COCOALOOPHIJACK}
|
||||
// The flag is set to true once hi-jacked loop is finished (at the end of app)
|
||||
|
@ -346,6 +346,9 @@ procedure ControlSetTextWithChangeEvent(ctrl: NSControl; const text: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
CocoaInt;
|
||||
|
||||
const
|
||||
VerticalScrollerVisible: array[TScrollStyle] of boolean = (
|
||||
{ssNone } false,
|
||||
@ -1900,7 +1903,7 @@ var
|
||||
btn: NSButton;
|
||||
cl: NSButtonCell;
|
||||
begin
|
||||
btn := AllocButton(AWinControl, TLCLButtonCallBack, AParams, NSTexturedRoundedBezelStyle, NSToggleButton);
|
||||
btn := AllocButton(AWinControl, TLCLButtonCallBack, AParams, CocoaToggleBezel, CocoaToggleType);
|
||||
cl := NSButtonCell(NSButton(btn).cell);
|
||||
cl.setShowsStateBy(cl.showsStateBy or NSContentsCellMask);
|
||||
Result := TLCLIntfHandle(btn);
|
||||
|
Loading…
Reference in New Issue
Block a user