mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 09:59:23 +02:00
Cocoa/Config: turn ToggleBox Config to the new Style
This commit is contained in:
parent
f90c864215
commit
8f495aed95
@ -87,9 +87,15 @@ var
|
||||
// min height for the Knob of VerticalScroller
|
||||
// min width for the Knob of HorizontalScroller
|
||||
minSize: 25;
|
||||
)
|
||||
);
|
||||
);
|
||||
);
|
||||
|
||||
var
|
||||
CocoaConfigToggleBox: TCocoaConfigToggleBox = (
|
||||
bezelStyle: NSRoundedBezelStyle;
|
||||
buttonType: NSPushOnPushOffButton;
|
||||
);
|
||||
|
||||
var
|
||||
CocoaConfigNotification: TCocoaConfigNotification = (
|
||||
|
@ -138,6 +138,12 @@ type
|
||||
overlay: TCocoaConfigScrollerOverlay;
|
||||
end;
|
||||
|
||||
type
|
||||
TCocoaConfigToggleBox = record
|
||||
bezelStyle: NSBezelStyle;
|
||||
buttonType: NSButtonType;
|
||||
end;
|
||||
|
||||
type
|
||||
TCocoaConfigNotification = record
|
||||
alwaysPresent: Boolean;
|
||||
@ -174,8 +180,6 @@ 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;
|
||||
|
||||
CocoaHideFocusNoBorder : Boolean = true;
|
||||
|
||||
|
@ -2275,7 +2275,8 @@ var
|
||||
btn: NSButton;
|
||||
cl: NSButtonCell;
|
||||
begin
|
||||
btn := AllocButton(AWinControl, TLCLCheckBoxCallback, AParams, CocoaToggleBezel, CocoaToggleType);
|
||||
btn := AllocButton(AWinControl, TLCLCheckBoxCallback, AParams,
|
||||
CocoaConfigToggleBox.bezelStyle, CocoaConfigToggleBox.buttonType);
|
||||
cl := NSButtonCell(NSButton(btn).cell);
|
||||
cl.setShowsStateBy(cl.showsStateBy or NSContentsCellMask);
|
||||
Result := TLCLHandle(btn);
|
||||
|
Loading…
Reference in New Issue
Block a user