mirror of https://github.com/LIJI32/SameBoy.git
Fix the cheat window's appearance in Mavericks
This commit is contained in:
parent
619792db7f
commit
b88a3a02a9
|
@ -748,7 +748,7 @@
|
|||
<rect key="frame" x="1" y="1" width="604" height="257"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="24" rowSizeStyle="large" headerView="pvX-uJ-qK5" id="tA3-8T-bxb">
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="24" headerView="pvX-uJ-qK5" id="tA3-8T-bxb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="604" height="240"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
|
@ -760,7 +760,7 @@
|
|||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
|
||||
</tableHeaderCell>
|
||||
<buttonCell key="dataCell" type="inline" bezelStyle="inline" image="NSStopProgressFreestandingTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="5xh-hN-jHH">
|
||||
<buttonCell key="dataCell" type="inline" bezelStyle="inline" image="NSStopProgressFreestandingTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="5xh-hN-jHH" customClass="GBDeleteButtonCell">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GBDeleteButtonCell : NSButtonCell
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,30 @@
|
|||
#import "GBDeleteButtonCell.h"
|
||||
|
||||
@implementation GBDeleteButtonCell
|
||||
|
||||
// Image scaling is broken on some older macOS versions
|
||||
- (void)drawImage:(NSImage *)image withFrame:(NSRect)frame inView:(NSView *)controlView
|
||||
{
|
||||
double size = 13;
|
||||
unsigned offset = 1;
|
||||
if (@available(macOS 10.10, *)) {
|
||||
size = 15;
|
||||
offset = 0;
|
||||
}
|
||||
frame.origin.x += round((frame.size.width - size) / 2) + offset;
|
||||
frame.origin.y += round((frame.size.height - size) / 2) - offset;
|
||||
frame.size.width = frame.size.height = size;
|
||||
[super drawImage:image withFrame:frame inView:controlView];
|
||||
}
|
||||
|
||||
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
|
||||
{
|
||||
[self drawImage:self.image withFrame:cellFrame inView:controlView];
|
||||
}
|
||||
|
||||
-(void)drawBezelWithFrame:(NSRect)frame inView:(NSView *)controlView
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue