Fixed anti-aliasing of checkboxes.
This commit is contained in:
1 parent
ea6b9b422d
commit
185325d68b
2 files changed
+20
-5
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user