Cocoa: fix some FocusRing config

This commit is contained in:
rich2014 2024-09-11 23:12:32 +08:00
parent dda392d165
commit d80f0c44f5
4 changed files with 13 additions and 3 deletions

View File

@ -25,8 +25,8 @@
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaTabControl') ); setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaTabControl') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaButton') ); setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaButton') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaTextField') ); setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaTextField') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaSpinEdit') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaComboBox') ); setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaComboBox') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaReadOnlyComboBox') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaTableListView') ); setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaTableListView') );
setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaCollectionView') ); setStrategy( TCocoaConfigFocusRing.Strategy.none, NSSTR('TCocoaCollectionView') );

View File

@ -26,7 +26,7 @@ uses
// widgetset // widgetset
WSSpin, WSLCLClasses, WSSpin, WSLCLClasses,
// cocoa ws // cocoa ws
CocoaPrivate, CocoaWSCommon, CocoaTextEdits; CocoaAll, CocoaPrivate, CocoaWSCommon, CocoaTextEdits, Cocoa_Extra;
type type
@ -71,6 +71,7 @@ begin
lSpin.callback := TLCLCommonCallback.Create(lSpin, AWinControl); lSpin.callback := TLCLCommonCallback.Create(lSpin, AWinControl);
if (lSpin.Stepper.isKindOfClass(TCocoaSpinEditStepper)) then if (lSpin.Stepper.isKindOfClass(TCocoaSpinEditStepper)) then
TCocoaSpinEditStepper(lSpin.Stepper).callback:=lSpin.callback; TCocoaSpinEditStepper(lSpin.Stepper).callback:=lSpin.callback;
UpdateControlFocusRing(lSpin, AWinControl);
end; end;
class procedure TCocoaWSCustomFloatSpinEdit.DestroyHandle(const AWinControl: TWinControl); class procedure TCocoaWSCustomFloatSpinEdit.DestroyHandle(const AWinControl: TWinControl);

View File

@ -2001,6 +2001,7 @@ begin
// to be tested and considered // to be tested and considered
//ComboBoxSetBorderStyle(cmb, TCustomComboBoxAccess(AWinControl).BorderStyle); //ComboBoxSetBorderStyle(cmb, TCustomComboBoxAccess(AWinControl).BorderStyle);
Result:=TLCLHandle(cmb); Result:=TLCLHandle(cmb);
UpdateControlFocusRing(cmb, AWinControl);
end; end;
//todo: 26 pixels is the height of 'normal' combobox. The value is taken from the Interface Builder! //todo: 26 pixels is the height of 'normal' combobox. The value is taken from the Interface Builder!
// use the correct way to set the size constraints // use the correct way to set the size constraints

View File

@ -131,7 +131,7 @@ end;"/>
<License Value="modified LGPL-2 <License Value="modified LGPL-2
"/> "/>
<Version Major="3" Minor="99"/> <Version Major="3" Minor="99"/>
<Files Count="545"> <Files Count="547">
<Item1> <Item1>
<Filename Value="carbon/agl.pp"/> <Filename Value="carbon/agl.pp"/>
<AddToUsesPkgSection Value="False"/> <AddToUsesPkgSection Value="False"/>
@ -2693,6 +2693,14 @@ end;"/>
<AddToUsesPkgSection Value="False"/> <AddToUsesPkgSection Value="False"/>
<UnitName Value="cocoatoolbar"/> <UnitName Value="cocoatoolbar"/>
</Item545> </Item545>
<Item546>
<Filename Value="cocoa/cocoaconfigfocusring.inc"/>
<Type Value="Include"/>
</Item546>
<Item547>
<Filename Value="cocoa/cocoaconfig.inc"/>
<Type Value="Include"/>
</Item547>
</Files> </Files>
<CompatibilityMode Value="True"/> <CompatibilityMode Value="True"/>
<LazDoc Paths="../../docs/xml/lcl"/> <LazDoc Paths="../../docs/xml/lcl"/>