diff --git a/lcl/interfaces/cocoa/cocoadefines.inc b/lcl/interfaces/cocoa/cocoadefines.inc index 5ed681d0b0..11ecefc387 100644 --- a/lcl/interfaces/cocoa/cocoadefines.inc +++ b/lcl/interfaces/cocoa/cocoadefines.inc @@ -11,6 +11,10 @@ // The issue is presumably only for 64-bit platform. // The workaround is possible! the issue should be fixed in future // release of FPC, but 3.0.4 is the offical supported by LCL. +{$if not(defined(CPUX86_64) or defined(CPUi386))} +{$define USE_IOS_VALUES} +{$endif} + {$if FPC_FULLVERSION>=30200} {$undef BOOLFIX} {$else} diff --git a/lcl/interfaces/cocoa/cocoatextedits.pas b/lcl/interfaces/cocoa/cocoatextedits.pas index ede633ef59..3c5213d7cd 100644 --- a/lcl/interfaces/cocoa/cocoatextedits.pas +++ b/lcl/interfaces/cocoa/cocoatextedits.pas @@ -443,8 +443,8 @@ type // these constants are missing from CocoaAll for some reason const NSTextAlignmentLeft = 0; - NSTextAlignmentRight = 1; // it's 2 for iOS and family - NSTextAlignmentCenter = 2; // it's 1 for iOS and family + NSTextAlignmentRight = {$ifdef USE_IOS_VALUES}2{$else}1{$endif}; // it's 2 for iOS and family + NSTextAlignmentCenter = {$ifdef USE_IOS_VALUES}1{$else}2{$endif}; // it's 1 for iOS and family NSTextAlignmentJustified = 3; NSTextAlignmentNatural = 4;