mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:59:16 +02:00
Cocoa/Config: turn ToggleBox Config to the new Style
This commit is contained in:
parent
f90c864215
commit
8f495aed95
@ -87,10 +87,16 @@ var
|
|||||||
// min height for the Knob of VerticalScroller
|
// min height for the Knob of VerticalScroller
|
||||||
// min width for the Knob of HorizontalScroller
|
// min width for the Knob of HorizontalScroller
|
||||||
minSize: 25;
|
minSize: 25;
|
||||||
)
|
);
|
||||||
);
|
);
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var
|
||||||
|
CocoaConfigToggleBox: TCocoaConfigToggleBox = (
|
||||||
|
bezelStyle: NSRoundedBezelStyle;
|
||||||
|
buttonType: NSPushOnPushOffButton;
|
||||||
|
);
|
||||||
|
|
||||||
var
|
var
|
||||||
CocoaConfigNotification: TCocoaConfigNotification = (
|
CocoaConfigNotification: TCocoaConfigNotification = (
|
||||||
// by default on macOS, Notification is only Presented when the APP is
|
// by default on macOS, Notification is only Presented when the APP is
|
||||||
|
@ -138,6 +138,12 @@ type
|
|||||||
overlay: TCocoaConfigScrollerOverlay;
|
overlay: TCocoaConfigScrollerOverlay;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
TCocoaConfigToggleBox = record
|
||||||
|
bezelStyle: NSBezelStyle;
|
||||||
|
buttonType: NSButtonType;
|
||||||
|
end;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCocoaConfigNotification = record
|
TCocoaConfigNotification = record
|
||||||
alwaysPresent: Boolean;
|
alwaysPresent: Boolean;
|
||||||
@ -174,8 +180,6 @@ var
|
|||||||
// if set to true, then WS would not assign icons via TCocoaWSForm SetIcon
|
// 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
|
// The icon would have to be changed manually. By default LCL behaviour is used
|
||||||
CocoaIconUse: Boolean = false;
|
CocoaIconUse: Boolean = false;
|
||||||
CocoaToggleBezel : NSBezelStyle = NSRoundedBezelStyle;
|
|
||||||
CocoaToggleType : NSButtonType = NSPushOnPushOffButton;
|
|
||||||
|
|
||||||
CocoaHideFocusNoBorder : Boolean = true;
|
CocoaHideFocusNoBorder : Boolean = true;
|
||||||
|
|
||||||
|
@ -2275,7 +2275,8 @@ var
|
|||||||
btn: NSButton;
|
btn: NSButton;
|
||||||
cl: NSButtonCell;
|
cl: NSButtonCell;
|
||||||
begin
|
begin
|
||||||
btn := AllocButton(AWinControl, TLCLCheckBoxCallback, AParams, CocoaToggleBezel, CocoaToggleType);
|
btn := AllocButton(AWinControl, TLCLCheckBoxCallback, AParams,
|
||||||
|
CocoaConfigToggleBox.bezelStyle, CocoaConfigToggleBox.buttonType);
|
||||||
cl := NSButtonCell(NSButton(btn).cell);
|
cl := NSButtonCell(NSButton(btn).cell);
|
||||||
cl.setShowsStateBy(cl.showsStateBy or NSContentsCellMask);
|
cl.setShowsStateBy(cl.showsStateBy or NSContentsCellMask);
|
||||||
Result := TLCLHandle(btn);
|
Result := TLCLHandle(btn);
|
||||||
|
Loading…
Reference in New Issue
Block a user