Skip to content

Commit

Permalink
Add 256 size images for the bootleg icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddTheSane committed Jan 25, 2024
1 parent 63003c2 commit 31bb4dc
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Boxer/BootlegCoverArt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class JewelCase : NSObject, BXBootlegCoverArt {
open class func textAttributes(for size: NSSize) -> [NSAttributedString.Key : Any] {
let lineHeight = lineHeight(for: size)
let fontSize = fontSize(for: size)
let color = self.textColor;
let color = self.textColor
let font = NSFont(name: self.fontName, size: fontSize)

let style = NSMutableParagraphStyle()
Expand Down
24 changes: 13 additions & 11 deletions Other Sources/ADBToolkit/NSString+ADBStringFormatting.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

@interface NSString (ADBStringFormattingPrivate)

//Returns an array of word-wrapped lines. This doesn't handle hard linebreaks at all.
- (NSArray *) _linesWrappedByWordAtLength: (NSUInteger)maxLength;
//! Returns an array of word-wrapped lines. This doesn't handle hard linebreaks at all.
- (NSArray<NSString*> *) _linesWrappedByWordAtLength: (NSUInteger)maxLength;

//Returns an array of character-wrapped lines. This doesn't handle hard linebreaks at all.
- (NSArray *) _linesWrappedByCharacterAtLength: (NSUInteger)maxLength;
//! Returns an array of character-wrapped lines. This doesn't handle hard linebreaks at all.
- (NSArray<NSString*> *) _linesWrappedByCharacterAtLength: (NSUInteger)maxLength;

@end

Expand All @@ -58,7 +58,7 @@ - (NSString *) sentenceCapitalizedString
NSString *capitalizedLetter = [self substringWithRange: firstLetter].uppercaseString;
return [self stringByReplacingCharactersInRange: firstLetter withString: capitalizedLetter];
}
else return self;
else return [self copy];
}

- (NSEnumerator *) lineEnumerator
Expand Down Expand Up @@ -103,14 +103,16 @@ - (NSString *) stringCharacterWrappedAtLineLength: (NSUInteger)maxLength withJoi
return [[self componentsSplitAtLineLength: maxLength atWordBoundaries: NO] componentsJoinedByString: joiner];
}

@end

#pragma mark -
#pragma mark Private methods
#pragma mark - Private methods

@implementation NSString (ADBStringFormattingPrivate)

- (NSArray *) _linesWrappedByWordAtLength: (NSUInteger)maxLength
- (NSArray<NSString*> *) _linesWrappedByWordAtLength: (NSUInteger)maxLength
{
NSUInteger length = self.length;
NSMutableArray *lines = [NSMutableArray arrayWithCapacity: (NSUInteger)ceil(length / (double)maxLength)];
NSMutableArray<NSString*> *lines = [NSMutableArray arrayWithCapacity: (NSUInteger)ceil(length / (double)maxLength)];

//IMPLEMENTATION NOTE: we've already split on linebreaks upstream in componentsSplitAtLineLength:atWordBoundaries,
//so we don't check for them again here. It would probably be quicker to do it all in one go here though.
Expand Down Expand Up @@ -150,12 +152,12 @@ - (NSArray *) _linesWrappedByWordAtLength: (NSUInteger)maxLength
return lines;
}

- (NSArray *) _linesWrappedByCharacterAtLength: (NSUInteger)maxLength
- (NSArray<NSString*> *) _linesWrappedByCharacterAtLength: (NSUInteger)maxLength
{
NSUInteger length = self.length;
NSUInteger offset = 0;

NSMutableArray *lines = [NSMutableArray arrayWithCapacity: (NSUInteger)ceil(length / (double)maxLength)];
NSMutableArray<NSString*> *lines = [NSMutableArray arrayWithCapacity: (NSUInteger)ceil(length / (double)maxLength)];

while (offset < length)
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 31bb4dc

Please sign in to comment.