mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 04:29:27 +02:00
Cocoa: NSTableView Style setting supported at Runtime #40633
This commit is contained in:
parent
d4d3c1dfef
commit
a99ffd317e
lcl/interfaces/cocoa
@ -6,10 +6,11 @@ unit CocoaConfig;
|
||||
interface
|
||||
|
||||
uses
|
||||
CocoaAll;
|
||||
CocoaAll, Cocoa_Extra;
|
||||
|
||||
var
|
||||
CocoaBasePPI : Integer = 96; // for compatiblity with LCL 1.8 release. The macOS base is 72ppi
|
||||
// for compatiblity with LCL 1.8 release. The macOS base is 72ppi
|
||||
CocoaBasePPI : Integer = 96;
|
||||
|
||||
// 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
|
||||
@ -19,7 +20,11 @@ var
|
||||
|
||||
CocoaHideFocusNoBorder : Boolean = true;
|
||||
|
||||
CocoaUseLocalizedFontName : Boolean = false; // some localized named might be too long to be returned properly by APIs
|
||||
// some localized named might be too long to be returned properly by APIs
|
||||
CocoaUseLocalizedFontName : Boolean = false;
|
||||
|
||||
// default NSTableViewStyle
|
||||
CocoaTableViewStyle : NSTableViewStyle = NSTableViewStyleAutomatic;
|
||||
|
||||
{$ifdef COCOALOOPHIJACK}
|
||||
// The flag is set to true once hi-jacked loop is finished (at the end of app)
|
||||
|
@ -29,7 +29,7 @@ uses
|
||||
Types, Classes, SysUtils,
|
||||
// Libs
|
||||
MacOSAll, CocoaAll, CocoaUtils, CocoaGDIObjects,
|
||||
cocoa_extra, CocoaPrivate, CocoaConst,
|
||||
cocoa_extra, CocoaPrivate, CocoaConst, CocoaConfig,
|
||||
// LCL
|
||||
LCLType;
|
||||
|
||||
@ -557,6 +557,7 @@ end;
|
||||
function TCocoaTableListView.initWithFrame(frameRect: NSRect): id;
|
||||
begin
|
||||
Result:=inherited initWithFrame(frameRect);
|
||||
setStyle( CocoaConfig.CocoaTableViewStyle );
|
||||
end;
|
||||
|
||||
procedure TCocoaTableListView.mouseDown(event: NSEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user