Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 29d61656fe | |||
| 52e21a8ced | |||
| 60974e14fd |
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.1</string>
|
||||
<string>2.0.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.1</string>
|
||||
<string>2.0.2</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2009-14 Alex Rozanski and other contributors. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'PXSourceList'
|
||||
s.version = '2.0.1'
|
||||
s.version = '2.0.2'
|
||||
s.author = { 'Alex Rozanski' => 'alex@rozanski.me' }
|
||||
s.license = 'BSD'
|
||||
s.homepage = 'https://github.com/Perspx/PXSourceList'
|
||||
@@ -23,6 +23,6 @@ Pod::Spec.new do |s|
|
||||
s.osx.deployment_target = '10.7'
|
||||
|
||||
s.public_header_files = 'PXSourceList/*.h'
|
||||
s.source = { :git => 'https://github.com/Perspx/PXSourceList.git', :tag => '2.0.1' }
|
||||
s.source = { :git => 'https://github.com/Perspx/PXSourceList.git', :tag => '2.0.2' }
|
||||
s.source_files = 'PXSourceList/**/*.{h,m}'
|
||||
end
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#import "PXSourceListBadgeCell.h"
|
||||
|
||||
#import "PXSourceList.h"
|
||||
|
||||
//Drawing constants
|
||||
static inline NSColor *badgeBackgroundColor() { return [NSColor colorWithCalibratedRed:(152/255.0) green:(168/255.0) blue:(202/255.0) alpha:1]; }
|
||||
static inline NSColor *badgeHiddenBackgroundColor() { return [NSColor colorWithDeviceWhite:(180/255.0) alpha:1]; }
|
||||
@@ -40,11 +42,27 @@ static const CGFloat badgeLeftAndRightPadding = 5.0;
|
||||
NSDictionary *attributes;
|
||||
NSColor *backgroundColor;
|
||||
|
||||
if(self.isHighlighted) {
|
||||
if(self.isHighlighted || self.backgroundStyle == NSBackgroundStyleDark) {
|
||||
backgroundColor = [NSColor whiteColor];
|
||||
|
||||
NSResponder *firstResponder = controlView.window.firstResponder;
|
||||
BOOL isFocused = [firstResponder isKindOfClass:[NSView class]] && [(NSView *)firstResponder isDescendantOf:controlView];
|
||||
BOOL isFocused = NO;
|
||||
|
||||
// Starting with the closest ancestor of the control view and the first responder (to make sure both views are in the
|
||||
// same subtree of the view hierarchy), keep going up the view hierarchy until we hit a PXSourceList instance to tell
|
||||
// if the source list is focused.
|
||||
// This covers both the cell-based and view-based cases as well as if a child view of the NSTableCellView (such as
|
||||
// a text field) is focused.
|
||||
if ([firstResponder isKindOfClass:[NSView class]]) {
|
||||
NSView *view = [(NSView*)firstResponder ancestorSharedWithView:controlView];
|
||||
do {
|
||||
if ([view isKindOfClass:[PXSourceList class]]) {
|
||||
isFocused = YES;
|
||||
break;
|
||||
}
|
||||
} while ((view = [view superview]));
|
||||
}
|
||||
|
||||
NSColor *textColor;
|
||||
|
||||
if (isMainWindowVisible && isFocused)
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
# PXSourceList Release Notes
|
||||
|
||||
## 2.0.2
|
||||
- Fix #39: Badges not drawn correctly when Source List row is selected.
|
||||
|
||||
## 2.0.1
|
||||
- Add missing note to the 2.0.0 release notes about marking `-[PXSourceList delegate]` and `-[PXSourceList dataSource]` as unavailable using \_\_attribute\_\_.
|
||||
|
||||
@@ -71,4 +74,4 @@
|
||||
- Removed `SourceListItem` from the old example project as it has been superseded by `PXSourceListItem`.
|
||||
- Removed the TODO.rtf file from the project as all issues are now being tracked through GitHub.
|
||||
- Upgraded the Xcode project to the Xcode 5 project format. `LastUpgradeCheck` was updated from `0450` to`0500`.
|
||||
- Added a Release Notes file ;)
|
||||
- Added a Release Notes file ;)
|
||||
|
||||
Reference in New Issue
Block a user