AppKit: CPControl, CPSlider PLATFORM conditional removal

- CPControl.j and CPSlider.j: one PLATFORM block each, resolved to
  runtime CPDOMAvailable guards; no preprocessor directives remain
  in either file
- work-in-progress towards complete removal of CPP directives
This commit is contained in:
David Richardson committed 2026-08-21 15:55:25 -06:00
1 parent 159a82e077
commit 51f4af0c5c
2 files changed
+4 -5

No files matched your search

+3 -2
View File
@@ -1039,7 +1039,8 @@ var CPControlBlackColor = [CPColor blackColor];
_baseWritingDirection = writingDirection;
[self didChangeValueForKey:@"baseWritingDirection"];
#if PLATFORM(DOM)
if (CPDOMAvailable)
{
var style;
@@ -1062,7 +1063,7 @@ var CPControlBlackColor = [CPColor blackColor];
}
_DOMElement.style.direction = style;
#endif
}
}
@end
+1 -3
View File
@@ -1002,15 +1002,13 @@ var AFFINITY = 5;
}
}
#if PLATFORM(DOM)
// Don't do this in nib2cib !..
if (_allowsTickMarkValuesOnly)
if (CPDOMAvailable && _allowsTickMarkValuesOnly)
{
[self setObjectValue:[self closestTickMarkValueToValue:[self doubleValue]]];
_currentTickMarkSegment = _closestTickMarkIndex;
[self sendAction:[self action] to:[self target]];
}
#endif
}
/*! @ignore */