Fixed anti-aliasing of checkboxes.

This commit is contained in:
Damiano Galassi committed 2014-12-04 11:25:06 +01:00
1 parent ea6b9b422d
commit 185325d68b
2 files changed
+20 -5

No files matched your search

+16 -1
View File
@@ -59,7 +59,6 @@ static void *SBOptionsViewContex = &SBOptionsViewContex;
- (instancetype)init {
self = [super initWithNibName:@"QueueOptions" bundle:nil];
if (self) {
}
return self;
}
@@ -67,6 +66,22 @@ static void *SBOptionsViewContex = &SBOptionsViewContex;
- (void)loadView {
[super loadView];
// Hack to fix crappy anti-aliasing on Yosemite
// unfortunately it fixes the checkboxes anti-aliasing,
// but break the popup buttons one…
if (NSClassFromString(@"NSVisualEffectView")) {
self.view.wantsLayer = YES;
for (NSButton *subview in self.view.subviews) {
if ([subview isKindOfClass:[NSButton class]]) {
NSAttributedString *string = [[NSAttributedString alloc] initWithString:subview.title
attributes:@{NSForegroundColorAttributeName:[NSColor labelColor],
NSFontAttributeName:[NSFont labelFontOfSize:11]}];
subview.attributedTitle = string;
}
}
}
// Observe the providers changes
// to update the specific provider languages popup
[self addObserver:self
+4 -4
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="14C68k" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="SBOptionsViewController">
@@ -13,7 +13,7 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView appearanceType="aqua" id="UlG-O3-eNc" userLabel="OptionsView">
<customView id="UlG-O3-eNc" userLabel="OptionsView">
<rect key="frame" x="0.0" y="0.0" width="334" height="281"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
@@ -33,7 +33,7 @@
</connections>
</button>
<button toolTip="Search metadata online" id="9GN-f6-r2j">
<rect key="frame" x="111" y="255" width="103" height="18"/>
<rect key="frame" x="111" y="255" width="112" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Fetch Metadata" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="QNO-e1-WUJ">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>