diff --git a/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.h b/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.h index 41fbc447..418c69cb 100644 --- a/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.h +++ b/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.h @@ -13,7 +13,6 @@ PUBLIC @interface OFBPathInfoCell : OakImageAndTextCell @property (nonatomic, assign) BOOL isOpen; @property (nonatomic, assign) BOOL isVisible; @property (nonatomic, assign) BOOL isLoading; -@property (nonatomic, assign) BOOL disableHighlight; - (NSRect)closeButtonRectInFrame:(NSRect)cellFrame; @end diff --git a/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.mm b/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.mm index a94f2786..ff043fb9 100644 --- a/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.mm +++ b/Frameworks/OakFileBrowser/src/ui/OFBPathInfoCell.mm @@ -97,15 +97,6 @@ static void DrawSpinner (NSRect cellFrame, BOOL isFlipped, NSColor* color, doubl return NSMouseInRect(mousePoint, [self closeButtonRectInFrame:cellFrame], controlView.isFlipped); } -- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView -{ - BOOL wasHighlighted = self.isHighlighted; - if(self.disableHighlight) - self.highlighted = NO; - [super drawInteriorWithFrame:cellFrame inView:controlView]; - self.highlighted = wasHighlighted; -} - - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { if([controlView respondsToSelector:@selector(indentationPerLevel)]) diff --git a/Frameworks/OakFilterList/src/ui/TableView.mm b/Frameworks/OakFilterList/src/ui/TableView.mm index b1e62422..17abb3ad 100644 --- a/Frameworks/OakFilterList/src/ui/TableView.mm +++ b/Frameworks/OakFilterList/src/ui/TableView.mm @@ -54,10 +54,6 @@ // ======================================== -@interface NSCell (DisableHighlight) -@property (nonatomic) BOOL disableHighlight; -@end - @interface OakInactiveTableView () @property (nonatomic) OakTextFieldMovementDelegate* textFieldMovementDelegate; @end @@ -66,8 +62,11 @@ - (NSCell*)preparedCellAtColumn:(NSInteger)column row:(NSInteger)row { NSCell* res = [super preparedCellAtColumn:column row:row]; - if([res respondsToSelector:@selector(setDisableHighlight:)]) - [res setDisableHighlight:[self.window isKeyWindow]]; + if(res.isHighlighted && [self.window isKeyWindow]) + { + res.backgroundStyle = NSBackgroundStyleDark; + res.highlighted = NO; + } return res; }