mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 20:18:09 +02:00
Cocoa/Config: turn Menu Config to the new Style
This commit is contained in:
parent
8f495aed95
commit
23b1da3131
@ -144,6 +144,12 @@ type
|
||||
buttonType: NSButtonType;
|
||||
end;
|
||||
|
||||
type
|
||||
TCocoaConfigMenu = record
|
||||
defaultCheckImageName: NSString;
|
||||
defaultRadioImageName: NSString;
|
||||
end;
|
||||
|
||||
type
|
||||
TCocoaConfigNotification = record
|
||||
alwaysPresent: Boolean;
|
||||
@ -186,10 +192,6 @@ var
|
||||
// some localized named might be too long to be returned properly by APIs
|
||||
CocoaUseLocalizedFontName : Boolean = false;
|
||||
|
||||
// default Image Name for MenuItem
|
||||
CocoaDefaultCheckMenuImageName : NSString;
|
||||
CocoaDefaultRadioMenuImageName : NSString;
|
||||
|
||||
{$ifdef COCOALOOPHIJACK}
|
||||
// The flag is set to true once hi-jacked loop is finished (at the end of app)
|
||||
// The flag is checked in Menus to avoid "double" Cmd+Q menu
|
||||
@ -198,6 +200,10 @@ var
|
||||
|
||||
{$include cocoaconfig.inc}
|
||||
|
||||
var
|
||||
CocoaConfigMenu: TCocoaConfigMenu = (
|
||||
);
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
@ -246,8 +252,8 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
CocoaDefaultCheckMenuImageName:= NSSTR('NSMenuCheckmark');
|
||||
CocoaDefaultRadioMenuImageName:= NSSTR('NSDatePickerCalendarHome');
|
||||
CocoaConfigMenu.defaultCheckImageName:= NSSTR('NSMenuCheckmark');
|
||||
CocoaConfigMenu.defaultRadioImageName:= NSSTR('NSDatePickerCalendarHome');
|
||||
initDefaultFoucsRingSetting;
|
||||
end.
|
||||
|
||||
|
@ -161,12 +161,12 @@ end;
|
||||
// used from the MenuMadness example
|
||||
class function TCocoaWSMenuItem.NSMenuCheckmark: NSImage;
|
||||
begin
|
||||
Result:=NSImage.imageNamed(CocoaConfig.CocoaDefaultCheckMenuImageName);
|
||||
Result:=NSImage.imageNamed(CocoaConfigMenu.defaultCheckImageName);
|
||||
end;
|
||||
|
||||
class function TCocoaWSMenuItem.NSMenuRadio: NSImage;
|
||||
begin
|
||||
Result:=NSImage.imageNamed(CocoaConfig.CocoaDefaultRadioMenuImageName)
|
||||
Result:=NSImage.imageNamed(CocoaConfigMenu.defaultRadioImageName);
|
||||
end;
|
||||
|
||||
class function TCocoaWSMenuItem.isSeparator(const ACaption: AnsiString): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user