diff --git a/Base.lproj/MainMenu.xib b/Base.lproj/MainMenu.xib index 4e61e785d..afd3bb849 100644 --- a/Base.lproj/MainMenu.xib +++ b/Base.lproj/MainMenu.xib @@ -34,7 +34,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -366,7 +366,7 @@ - + @@ -402,7 +402,7 @@ - + @@ -547,12 +547,12 @@ - FontSizetoLineHeightTransformer + diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index 6857e543f..9cf1cfadf 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -303,9 +303,15 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc NSView * view = [tableView makeViewWithIdentifier:cellIdentifier owner:nil]; if (view) { NSTableCellView * cellView = (NSTableCellView *) view; - if (cellView.textField) { - NSFont * font = [NSFont systemFontOfSize:fontSize]; + NSRect frameRect = cellView.frame; + frameRect.origin.y = 1; + frameRect.size.height = tableView.rowHeight; + cellView.frame = frameRect; + if (cellView.textField) { + + NSFont * font = [NSFont systemFontOfSize:fontSize]; + cellView.textField.font = font; cellView.textField.stringValue = cellText; cellView.textField.alignment = cellTextAlignment; @@ -314,11 +320,22 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc cellView.textField.toolTip = cellText; else cellView.textField.toolTip = [pe statusMessage]; + + NSRect cellFrameRect = cellView.textField.frame; + cellFrameRect.origin.y = 1; + cellFrameRect.size.height = frameRect.size.height; + cellView.textField.frame = cellFrameRect; } if (cellView.imageView) { cellView.imageView.image = cellImage; cellView.imageView.toolTip = [pe statusMessage]; + + NSRect cellFrameRect = cellView.imageView.frame; + cellFrameRect.size.height = frameRect.size.height; + cellFrameRect.origin.y = 1; + cellView.imageView.frame = cellFrameRect; } + cellView.rowSizeStyle = NSTableViewRowSizeStyleCustom; } @@ -327,6 +344,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc - (void)updateRowSize { [self.tableView reloadData]; + if (currentEntry != nil) [self.tableView scrollRowToVisible:currentEntry.index]; } - (void)tableView:(NSTableView *)tableView didClickTableColumn:(NSTableColumn *)tableColumn { diff --git a/Transformers/FontSizetoLineHeightTransformer.m b/Transformers/FontSizetoLineHeightTransformer.m index b5cf1b908..20913fcfc 100644 --- a/Transformers/FontSizetoLineHeightTransformer.m +++ b/Transformers/FontSizetoLineHeightTransformer.m @@ -18,7 +18,7 @@ - (id)transformedValue:(id)value { NSFont *font = [NSFont systemFontOfSize:[(NSNumber *)value floatValue]]; NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init]; - float fRowSize = [layoutManager defaultLineHeightForFont:font] * 1.2; + float fRowSize = [layoutManager defaultLineHeightForFont:font]; return [NSNumber numberWithFloat: fRowSize]; }