mirror of https://github.com/LIJI32/SameBoy.git
Fix Mavericks regressions
This commit is contained in:
parent
00000971d7
commit
8508eb7b7c
|
@ -406,13 +406,9 @@
|
|||
<textField key="view" focusRingType="none" verticalHuggingPriority="750" id="rdV-q6-hc6">
|
||||
<rect key="frame" x="0.0" y="14" width="64" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="NO" state="on" borderStyle="bezel" placeholderString="Bank" drawsBackground="YES" id="JCn-Y1-eHS" customClass="GBToolbarFieldCell">
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" state="on" borderStyle="bezel" placeholderString="Bank" drawsBackground="NO" id="JCn-Y1-eHS" customClass="GBToolbarFieldCell">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="sendsWholeSearchString" value="YES"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<action selector="hexUpdateBank:" target="-2" id="Mx9-WI-wgO"/>
|
||||
|
@ -426,13 +422,9 @@
|
|||
<textField key="view" focusRingType="none" verticalHuggingPriority="750" id="EJd-jG-hmH">
|
||||
<rect key="frame" x="0.0" y="14" width="160" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="NO" state="on" borderStyle="bezel" placeholderString="Address" bezelStyle="round" id="vg5-Nn-abb" customClass="GBToolbarFieldCell">
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" state="on" borderStyle="bezel" placeholderString="Address" bezelStyle="round" id="vg5-Nn-abb" customClass="GBToolbarFieldCell">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="sendsWholeSearchString" value="YES"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<action selector="hexGoTo:" target="-2" id="7WG-8C-SK8"/>
|
||||
|
|
|
@ -20,4 +20,13 @@
|
|||
method_setImplementation(class_getInstanceMethod([GBToolbarFieldCell class], _cmd), imp);
|
||||
((void(*)(id, SEL, id))imp)(self, _cmd, textObj);
|
||||
}
|
||||
|
||||
// We only need this hack on Solarium, avoid regressions
|
||||
+ (instancetype)allocWithZone:(struct _NSZone *)zone
|
||||
{
|
||||
if (@available(macOS 26.0, *)) {
|
||||
return [super allocWithZone:zone];
|
||||
}
|
||||
return (id)[NSTextFieldCell allocWithZone:zone];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -66,7 +66,11 @@
|
|||
|
||||
+ (void)load
|
||||
{
|
||||
method_exchangeImplementations(class_getInstanceMethod(self, @selector(wantsUpdateLayer)),
|
||||
Method method = class_getInstanceMethod(self, @selector(wantsUpdateLayer));
|
||||
if (class_addMethod(self, @selector(wantsUpdateLayer), method_getImplementation(method), method_getTypeEncoding(method))) {
|
||||
method = class_getInstanceMethod(self, @selector(wantsUpdateLayer));
|
||||
}
|
||||
method_exchangeImplementations(method,
|
||||
class_getInstanceMethod(self, @selector(wantsUpdateLayerHook)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue