1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
|
{%MainUnit cocoaconfig.pas}
{
default config of Cocoa.
we can modify the default config in the APP.
}
var
CocoaConfigMenu: TCocoaConfigMenu = (
menuItem: (
defaultCheckImageName: nil; // set in cocoaconfig.pas
defaultRadioImageName: nil // set in cocoaconfig.pas
);
// Application interface provided to facilitate APP to operate App Menu.
// it's easy to set About, Preferences, and customized menus,
// only the LCL TMenuItem is needed to pass in.
// and we can control whether Cocoa is needed to automatically add
// Hide, Hide Others, Show All, and Quit menu items.
appMenu: (
aboutItem: nil;
preferencesItem: nil;
customMenus: nil;
onCreate: nil;
dontAutoCreateItems: False;
);
// Application interface provided to facilitate APP to operate Dock Menu.
// only the LCL TMenuItem is needed to pass in.
dockMenu: (
customMenus: nil;
);
);
var
CocoaConfigApplication: TCocoaConfigApplication = (
events: (
// highest priority event handler
highestHandler: nil;
// Event to call when there is no MainForm with MainForm.close
onQuitApp: nil;
// Platform key Event modification function
keyEventToVK: nil;
);
);
var
CocoaConfigGlobal: TCocoaConfigGlobal = (
// for compatiblity with LCL 1.8 release. The macOS base is 72ppi
basePPI: 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
useIcon: False;
// some localized named might be too long to be returned properly by APIs
useLocalizedFontName: False;
);
var
CocoaConfigComboBox: TCocoaConfigComboBox = (
readOnly: (
item: ( defaultHeight: 18 )
);
);
var
CocoaConfigListView: TCocoaConfigListView = (
vsReport: (
tableViewStyle: NSTableViewStyleAutomatic;
row: ( defaultHeight: 16; imageLineSpacing: 4*2 );
column: ( controlSpacing: 4; textFieldMinWidth: 16 );
columnAutoFit: ( maxCalcRows: 100; minWidth: 20; headerAdditionalWidth: 4 );
);
vsIcon: (
interitemSpacing: 4;
lineSpacing: 4;
item: (
minSize: ( width:64; height:68 );
controlSpacing: 2;
textFieldAlignment: {$ifdef USE_IOS_VALUES}1{$else}2{$endif}; // NSTextAlignmentCenter
checkBoxOccupiedWidth: 24
);
imageView: ( minSize: ( width: 32; height: 32 ); padding: 10; );
textField: ( defaultHeight: 15 );
);
vsSmallIcon: (
interitemSpacing: 10;
lineSpacing: 0;
item: (
minSize: ( width:150; height:28 );
controlSpacing: 2;
textFieldAlignment: 0; // NSTextAlignmentLeft
checkBoxOccupiedWidth: 24
);
imageView: ( minSize: ( width: 16; height: 16 ); padding: 4; );
textField: ( iconWidthFactor: 3; baseWidth: 0; minWidth: 128 );
);
vsList: (
interitemSpacing: 0;
lineSpacing: 10;
item: (
minSize: ( width:146; height:24 );
controlSpacing: 4;
textFieldAlignment: 0; // NSTextAlignmentLeft
checkBoxOccupiedWidth: 24
);
);
);
var
CocoaConfigScroller: TCocoaConfigScroller = (
// the style of the TCocoaScrollBar managed by TCocoaManualScrollView,
// the default value is System Preferred.
// note: TCocoaScrollBar not managed by TCocoaManualScrollView is always
// Legacy Style.
preferredStyle: -1;
// fade in/out time interval, in Seconds
fadeTimeInterval: 0.02;
legacy: (
knob: (
radius: 4; // Knob Radius, in Dots
color: @getCocoaScrollerDefaultKnobColor;
pos: 3; // Knob Position, in Dots
shrunkSize: 5; // Knob Shrunk Size, in Dots
alpha: 0.25; // Knob Alpha in Normal
alphaBlack: 0.5; // Knob Alpha when mouse enters
fadeStep: 0.05; // Knob Alpha Step when fading in/out
);
);
overlay: (
bar: (
// Overly Style Scroller Auto Show Delay Time, in Seconds
// used when the Scroller is triggered by double-finger tapping the touchpad
autoShowDelayTime: 0.2;
autoHideDelayTime: 0.9; // Bar Auto Hide Delay Time, in Seconds
alpha: 0.5; // Bar Alpha in Normal
alphaFadeStep: -0.1; // Bar Alpha Step when fading out
alphaFadeTo: 0; // Bar Alpha when fade out ends
expandTimeInterval: 0.03; // Bar Expands time interval, in Seconds
expandSize: 4; // Bar Expands when the mouse enters, in Dots
);
knob: (
radius: 4; // Knob Radius, in Dots
color: @getCocoaScrollerDefaultKnobColor;
pos: 5; // Knob Position, in Dots
shrunkSize: 6; // Knob Shrunk Size, in Dots
// in extreme cases, the normally calculated Knob size of Overlay Scroller
// may be too small, keep the min size.
// min height for the Knob of VerticalScroller
// min width for the Knob of HorizontalScroller
minSize: 25;
);
);
);
var
CocoaConfigToggleBox: TCocoaConfigToggleBox = (
bezelStyle: NSRoundedBezelStyle;
buttonType: NSPushOnPushOffButton;
);
var
CocoaConfigPanel: TCocoaConfigPanel = (
// False: Frame3dBox() for TCustomPanel
// True: Frame3dClassic() for TCustomPanel
classicFrame3d: False;
);
var
CocoaConfigMouse: TCocoaConfigMouse = (
// False: Control-Left-Click passes straight through
// True: Control-Left-Click will become Right Click
controlLeftToRightClick: False;
);
var
CocoaConfigNotification: TCocoaConfigNotification = (
// by default on macOS, Notification is only Presented when the APP is
// in the background.
// when CocoaAlwaysPresentNotification is set to True, Notification is
// always Presented.
alwaysPresent: True;
);
|