aboutsummaryrefslogtreecommitdiff
path: root/Flat Bezel
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2023-02-08 16:45:16 +0100
committerRuben Beltran del Rio <ruben@unlimited.pizza>2023-02-08 16:45:16 +0100
commit5200836d4b4ca9baf0f578f7a462f27d155abff4 (patch)
treed190f2782c4b0f160faaaf1226e2de7561001272 /Flat Bezel
Initial Commit
Diffstat (limited to 'Flat Bezel')
-rw-r--r--Flat Bezel/BBBackgroundView.h5
-rw-r--r--Flat Bezel/BBBackgroundView.m24
-rw-r--r--Flat Bezel/BBFlatBezelInterface.h9
-rw-r--r--Flat Bezel/BBFlatBezelInterface.m99
-rw-r--r--Flat Bezel/BBFlatBezelInterface.xib115
-rw-r--r--Flat Bezel/BBSearchObjectView.h10
-rw-r--r--Flat Bezel/BBSearchObjectView.m176
-rw-r--r--Flat Bezel/en.lproj/InfoPlist.strings2
-rwxr-xr-xFlat Bezel/gear-black.pngbin0 -> 14198 bytes
-rwxr-xr-xFlat Bezel/gear-white.pngbin0 -> 15108 bytes
-rwxr-xr-xFlat Bezel/search-black.pngbin0 -> 13605 bytes
-rwxr-xr-xFlat Bezel/search-white.pngbin0 -> 15201 bytes
12 files changed, 440 insertions, 0 deletions
diff --git a/Flat Bezel/BBBackgroundView.h b/Flat Bezel/BBBackgroundView.h
new file mode 100644
index 0000000..1c699a2
--- /dev/null
+++ b/Flat Bezel/BBBackgroundView.h
@@ -0,0 +1,5 @@
+#import <QSInterface/QSInterface.h>
+
+@interface BBBackgroundView : QSBezelBackgroundView
+
+@end
diff --git a/Flat Bezel/BBBackgroundView.m b/Flat Bezel/BBBackgroundView.m
new file mode 100644
index 0000000..7aff10b
--- /dev/null
+++ b/Flat Bezel/BBBackgroundView.m
@@ -0,0 +1,24 @@
+#import "BBBackgroundView.h"
+
+@implementation BBBackgroundView
+
+- (void)drawRect:(NSRect)rect {
+ rect = [self bounds];
+
+ NSBezierPath *roundRect = [NSBezierPath bezierPath];
+
+ [roundRect appendBezierPathWithRoundedRectangle:rect withRadius:8];
+ [roundRect addClip];
+
+ BOOL darkMode = [[NSUserDefaults standardUserDefaults] boolForKey:@"QSFlatBezelDarkMode"];
+ if (darkMode) {
+ [[NSColor colorWithRed:.1 green:.1 blue:.1 alpha:.99] set];
+ } else {
+ [[NSColor colorWithRed:1 green:1 blue:1 alpha:.99] set];
+ }
+ NSRectFill(rect);
+
+ [super drawRect:rect];
+}
+
+@end
diff --git a/Flat Bezel/BBFlatBezelInterface.h b/Flat Bezel/BBFlatBezelInterface.h
new file mode 100644
index 0000000..301542d
--- /dev/null
+++ b/Flat Bezel/BBFlatBezelInterface.h
@@ -0,0 +1,9 @@
+@interface BBFlatBezelInterface : QSResizingInterfaceController {
+ NSRect standardRect;
+}
+
+@end
+
+@interface NSWindow (QSBCInterfaceController)
+- (NSTimeInterval)animationResizeTime:(NSRect)newWindowFrame;
+@end
diff --git a/Flat Bezel/BBFlatBezelInterface.m b/Flat Bezel/BBFlatBezelInterface.m
new file mode 100644
index 0000000..a191f81
--- /dev/null
+++ b/Flat Bezel/BBFlatBezelInterface.m
@@ -0,0 +1,99 @@
+#import "BBFlatBezelInterface.h"
+
+@interface BBFlatBezelInterface () {
+ CGRect initialRect;
+}
+@end
+
+@implementation BBFlatBezelInterface
+
+- (id)init {
+ return [self initWithWindowNibName:@"BBFlatBezelInterface"];
+}
+
+- (void)windowDidLoad {
+ initialRect = centerRectInRect([[self window] frame], [[NSScreen mainScreen] frame]);
+
+ [super windowDidLoad];
+
+ QSWindow *window = (QSWindow *)[self window];
+ [window setLevel:NSPopUpMenuWindowLevel];
+ [window setBackgroundColor:[NSColor clearColor]];
+ [window setOpaque:NO];
+
+ [window setHideOffset:NSMakePoint(0, 0)];
+ [window setShowOffset:NSMakePoint(0, 0)];
+
+ [window setMovableByWindowBackground:NO];
+ [window setFastShow:YES];
+ [window setHasShadow:YES];
+
+ [window setFrame:standardRect display:YES];
+
+ NSArray *theControls = [NSArray arrayWithObjects:dSelector, aSelector, iSelector, nil];
+ for(QSSearchObjectView *theControl in theControls) {
+ QSObjectCell *theCell = [theControl cell];
+
+ [theControl setPreferredEdge:NSMinYEdge];
+ [(QSWindow *)[(theControl)->resultController window] setHideOffset:NSMakePoint(0, NSMinY([iSelector frame]))];
+ [(QSWindow *)[(theControl)->resultController window] setShowOffset:NSMakePoint(0, NSMinY([dSelector frame]))];
+
+ [theCell setBackgroundColor:[NSColor clearColor]];
+ [theCell setFont:[NSFont systemFontOfSize:11 weight:NSFontWeightLight]];
+ [theCell setCellRadiusFactor:8];
+
+ [theCell setHighlightColor:[NSColor colorWithRed:1 green:1 blue:1 alpha:.15]];
+ [theCell setTextColor:[NSColor colorWithWhite:.8 alpha:1]];
+ [theCell setShowDetails:NO];
+ [theCell setState:NSControlStateValueOn];
+ [theCell setIconSize:QSSize128];
+ [theCell setImagePosition:NSImageAbove];
+ }
+
+ [self contractWindow:nil];
+}
+
+- (NSSize) maxIconSize {
+ return QSSize32;
+}
+
+- (void)showMainWindow:(id)sender {
+ [[self window] setFrame:[self rectForState:[self expanded]] display:YES];
+ if ([[self window] isVisible]) [[self window] pulse:self];
+ [super showMainWindow:sender];
+ // Does this need to be here?
+ [[[self window] contentView] setNeedsDisplay:YES];
+}
+
+- (void)expandWindow:(id)sender {
+ if (![self expanded])
+ [[self window] setFrame:[self rectForState:YES] display:YES animate:YES];
+ [super expandWindow:sender];
+}
+
+- (void)contractWindow:(id)sender {
+ if ([self expanded])
+ [[self window] setFrame:[self rectForState:NO] display:YES animate:YES];
+ [super contractWindow:sender];
+}
+
+- (NSRect)rectForState:(BOOL)shouldExpand {
+ NSRect newRect = initialRect;
+ NSRect screenRect = [[NSScreen mainScreen] frame];
+
+ if (!shouldExpand) {
+ newRect.size.width -= 208;
+ }
+
+ return NSOffsetRect(centerRectInRect(newRect, screenRect), 0, (NSHeight(screenRect) / 5));
+}
+
+- (NSRect)window:(NSWindow *)window willPositionSheet:(NSWindow *)sheet usingRect:(NSRect)rect {
+ return NSOffsetRect(NSInsetRect(rect, 8, 0), 0, 0);
+}
+
+- (NSTimeInterval)animationResizeTime:(NSRect)newWindowFrame {
+ return 0.01;
+}
+
+@end
diff --git a/Flat Bezel/BBFlatBezelInterface.xib b/Flat Bezel/BBFlatBezelInterface.xib
new file mode 100644
index 0000000..75378c6
--- /dev/null
+++ b/Flat Bezel/BBFlatBezelInterface.xib
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+ <dependencies>
+ <deployment identifier="macosx"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="BBFlatBezelInterface">
+ <connections>
+ <outlet property="aSelector" destination="69" id="79"/>
+ <outlet property="commandView" destination="191" id="207"/>
+ <outlet property="dSelector" destination="68" id="75"/>
+ <outlet property="iSelector" destination="70" id="80"/>
+ <outlet property="menuButton" destination="209" id="210"/>
+ <outlet property="progressIndicator" destination="192" id="211"/>
+ <outlet property="window" destination="9" id="78"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+ <window title="Bezel Interface" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="9" userLabel="mainWindow" customClass="QSBorderlessWindow">
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" nonactivatingPanel="YES"/>
+ <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+ <rect key="contentRect" x="530" y="653" width="648" height="200"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1512" height="944"/>
+ <value key="minSize" type="size" width="440" height="200"/>
+ <view key="contentView" id="6" customClass="BBBackgroundView">
+ <rect key="frame" x="0.0" y="0.0" width="648" height="200"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <customView translatesAutoresizingMaskIntoConstraints="NO" id="68" customClass="BBCollectingSearchObjectView">
+ <rect key="frame" x="0.0" y="0.0" width="200" height="200"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="200" id="SwQ-fC-3aw"/>
+ <constraint firstAttribute="width" constant="200" id="Zol-hr-3Bk"/>
+ </constraints>
+ <connections>
+ <outlet property="nextKeyView" destination="69" id="105"/>
+ </connections>
+ </customView>
+ <customView translatesAutoresizingMaskIntoConstraints="NO" id="69" customClass="BBSearchObjectView">
+ <rect key="frame" x="208" y="0.0" width="200" height="200"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="200" id="O3w-M3-b05"/>
+ <constraint firstAttribute="height" constant="200" id="XPL-72-l7r"/>
+ </constraints>
+ <connections>
+ <outlet property="nextKeyView" destination="70" id="106"/>
+ </connections>
+ </customView>
+ <customView translatesAutoresizingMaskIntoConstraints="NO" id="70" customClass="BBCollectingSearchObjectView">
+ <rect key="frame" x="416" y="0.0" width="200" height="200"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="200" id="Jbn-VW-sSJ"/>
+ <constraint firstAttribute="height" constant="200" id="X3X-S6-KrY"/>
+ </constraints>
+ <connections>
+ <outlet property="nextKeyView" destination="68" id="104"/>
+ </connections>
+ </customView>
+ <progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="192">
+ <rect key="frame" x="624" y="8" width="16" height="16"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="16" id="Py4-hV-7HG"/>
+ </constraints>
+ </progressIndicator>
+ <button translatesAutoresizingMaskIntoConstraints="NO" id="209" customClass="QSMenuButton">
+ <rect key="frame" x="624" y="176" width="16" height="16"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="16" id="cvg-xh-bvD"/>
+ <constraint firstAttribute="width" constant="16" id="w12-Bf-x2f"/>
+ </constraints>
+ <buttonCell key="cell" type="square" title="▾" bezelStyle="shadowlessSquare" alignment="center" transparent="YES" inset="2" id="216">
+ <behavior key="behavior" lightByContents="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <color key="contentTintColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ </button>
+ <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="191">
+ <rect key="frame" x="622" y="176" width="20" height="16"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="16" id="Yy8-MR-Hc2"/>
+ <constraint firstAttribute="width" constant="16" id="coj-vh-kaj"/>
+ </constraints>
+ <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" alignment="center" title="⏷" id="214">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ </subviews>
+ <constraints>
+ <constraint firstItem="209" firstAttribute="top" secondItem="6" secondAttribute="top" constant="8" id="1uj-pU-uJB"/>
+ <constraint firstItem="70" firstAttribute="leading" secondItem="69" secondAttribute="trailing" constant="8" id="3iK-bw-ky1"/>
+ <constraint firstAttribute="bottom" secondItem="192" secondAttribute="bottom" constant="8" id="ASY-5E-0bJ"/>
+ <constraint firstAttribute="trailing" secondItem="191" secondAttribute="trailing" constant="8" id="EMC-Sk-VX7"/>
+ <constraint firstAttribute="trailing" secondItem="192" secondAttribute="trailing" constant="8" id="S36-iH-Apn"/>
+ <constraint firstItem="69" firstAttribute="leading" secondItem="68" secondAttribute="trailing" constant="8" id="VOZ-kp-hVQ"/>
+ <constraint firstAttribute="trailing" secondItem="209" secondAttribute="trailing" constant="8" id="ZBS-80-x88"/>
+ <constraint firstItem="69" firstAttribute="top" secondItem="6" secondAttribute="top" id="Zec-BE-M9X"/>
+ <constraint firstItem="70" firstAttribute="top" secondItem="6" secondAttribute="top" id="jQN-Vd-Qm0"/>
+ <constraint firstItem="191" firstAttribute="top" secondItem="209" secondAttribute="bottom" constant="-16" id="jqz-xK-7Wg"/>
+ <constraint firstItem="68" firstAttribute="leading" secondItem="6" secondAttribute="leading" id="m72-ls-RGc"/>
+ <constraint firstItem="68" firstAttribute="top" secondItem="6" secondAttribute="top" id="msf-m2-n1U"/>
+ </constraints>
+ </view>
+ <connections>
+ <outlet property="delegate" destination="-2" id="81"/>
+ <outlet property="initialFirstResponder" destination="68" id="111"/>
+ </connections>
+ <point key="canvasLocation" x="76" y="-42"/>
+ </window>
+ </objects>
+</document>
diff --git a/Flat Bezel/BBSearchObjectView.h b/Flat Bezel/BBSearchObjectView.h
new file mode 100644
index 0000000..b60a637
--- /dev/null
+++ b/Flat Bezel/BBSearchObjectView.h
@@ -0,0 +1,10 @@
+#import <QSInterface/QSInterface.h>
+
+@interface BBSearchObjectView : QSSearchObjectView
+@end
+
+@interface BBCollectingSearchObjectView : QSCollectingSearchObjectView
+@end
+
+@interface BBObjectCell : QSObjectCell
+@end
diff --git a/Flat Bezel/BBSearchObjectView.m b/Flat Bezel/BBSearchObjectView.m
new file mode 100644
index 0000000..ba88b0b
--- /dev/null
+++ b/Flat Bezel/BBSearchObjectView.m
@@ -0,0 +1,176 @@
+#import "BBSearchObjectView.h"
+
+@implementation BBSearchObjectView
++ (Class)cellClass { return [BBObjectCell class]; }
+
+@end
+
+@implementation BBCollectingSearchObjectView
++ (Class)cellClass { return [BBObjectCell class]; }
+
+- (void)drawRect:(NSRect)rect {
+ NSRect frame = [self frame];
+ NSInteger count = [collection count];
+ if (![self currentEditor] && count) {
+ frame.origin = NSZeroPoint;
+ [[self cell] drawWithFrame:frame inView:self];
+ NSInteger i;
+ CGFloat iconSize = collectionSpace?collectionSpace:16;
+ CGFloat opacity = collecting?1.0:0.75;
+ QSObject *object;
+ CGFloat totalWidth = iconSize + 2;
+ for (i = 0; i<count; i++) {
+ object = [collection objectAtIndex:i];
+ NSImage *icon = [object icon];
+ [icon setSize:QSSize16];
+ [icon drawInRect:NSMakeRect(frame.size.width-totalWidth*(count-i), frame.origin.y+2, iconSize, iconSize) fromRect:rectFromSize([icon size]) operation:NSCompositingOperationSourceOver fraction:opacity];
+ }
+ } else {
+ [super drawRect:rect];
+ }
+}
+
+- (NSRect)textEditorFrame {
+ NSRect titleFrame = [self frame];
+ NSRect editorFrame = NSInsetRect(titleFrame, 8, 8);
+ editorFrame.origin = NSMakePoint(8, 8);
+ editorFrame = NSIntegralRect(editorFrame);
+ return editorFrame;
+}
+
+
+@end
+
+@implementation BBObjectCell
+
+- (NSCellImagePosition)preferredImagePosition {
+ return NSImageAbove;
+}
+
+- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
+ BOOL isFirstResponder = [[controlView window] firstResponder] == controlView && ![controlView isKindOfClass:[NSTableView class]];
+ BOOL dropTarget = ([self isHighlighted] && ([self highlightsBy] & NSChangeBackgroundCellMask) && ![self isBezeled]);
+
+ NSColor *fillColor;
+ NSColor *strokeColor = [NSColor clearColor];
+
+ if (isFirstResponder) {
+ fillColor = [self highlightColor];
+ } else {
+ fillColor = [self backgroundColor];
+ }
+
+ if (dropTarget) {
+ fillColor = [NSColor colorWithRed:0.77 green:0.91 blue:0.96 alpha:1];
+ }
+
+ [fillColor setFill];
+ [strokeColor setStroke];
+
+ NSBezierPath *roundRect = [NSBezierPath bezierPath];
+ [roundRect appendBezierPathWithRoundedRectangle:cellFrame withRadius:cellRadiusFactor];
+ [roundRect fill];
+
+ [self drawInteriorWithFrame:[self drawingRectForBounds:cellFrame] inView:controlView];
+}
+
+- (NSRect)titleRectForBounds:(NSRect)theRect
+{
+ NSRect rect = theRect;
+ rect = NSOffsetRect(rect, 0, -4);
+ return [super titleRectForBounds: rect];
+}
+
+- (void)drawTextForObject:(QSObject *)drawObject withFrame:(NSRect)cellFrame inView:(NSView *)controlView {
+ if ([self imagePosition] == NSImageOnly) return;
+
+ NSString *abbrString = nil;
+ if ([controlView respondsToSelector:@selector(matchedString)])
+ abbrString = [(QSSearchObjectView *)controlView matchedString];
+
+ NSString *nameString = nil;
+ NSIndexSet *hitMask = nil;
+
+ id ranker = [drawObject ranker];
+ if (ranker && abbrString)
+ nameString = [ranker matchedStringForAbbreviation:abbrString hitmask:&hitMask inContext:nil];
+
+ if (!nameString)
+ nameString = [drawObject displayName];
+
+ BOOL rankedStringIsName = [nameString isEqualToString:[drawObject displayName]] || nameString == nil;
+ if (!nameString) {
+ // fall back to the identifier if no reasonable name can be found
+ nameString = [drawObject identifier];
+ }
+ if (!nameString) {
+ // Couldn't find anything sensible to use for the name, fallback to avoid a crash
+ nameString = @"Unknown";
+ }
+
+ BOOL useAlternateColor = [controlView isKindOfClass:[NSTableView class]] && [(NSTableView *)controlView isRowSelected:[(NSTableView *)controlView rowAtPoint:cellFrame.origin]];
+ NSColor *mainColor = (textColor ? textColor : (useAlternateColor ? [NSColor alternateSelectedControlTextColor] : [NSColor controlTextColor]));
+ NSColor *fadedColor = [mainColor colorWithAlphaComponent:0.50];
+ NSRect textDrawRect = [self titleRectForBounds:cellFrame];
+
+ NSMutableAttributedString *titleString = [[[NSMutableAttributedString alloc] initWithString:nameString] autorelease];
+ [titleString setAttributes:rankedStringIsName ? nameAttributes : detailsAttributes range:NSMakeRange(0, [titleString length])];
+
+ // Bring out the matched letters
+ if (abbrString && ![abbrString hasPrefix:@"QSActionMnemonic"]) {
+ [titleString addAttribute:NSForegroundColorAttributeName value:rankedStringIsName ? fadedColor : [fadedColor colorWithAlphaComponent:0.8] range:NSMakeRange(0, [titleString length])];
+
+ NSUInteger i = 0;
+ NSUInteger j = 0;
+ NSUInteger hits[[titleString length]];
+ NSUInteger count = [hitMask getIndexes:(NSUInteger *)&hits maxCount:[titleString length] inIndexRange:nil];
+ NSDictionary *attributes = @{
+ NSForegroundColorAttributeName: rankedStringIsName ? mainColor : fadedColor
+ };
+ for(i = 0; i<count; i += j) {
+ for (j = 1; i+j<count && hits[i+j-1] +1 == hits[i+j]; j++);
+ [titleString addAttributes:attributes range:NSMakeRange(hits[i], j)];
+ }
+ } else {
+ [titleString addAttribute:NSBaselineOffsetAttributeName value:[NSNumber numberWithDouble:-1.0] range:NSMakeRange(0, [titleString length])];
+ }
+//
+// // Ranked string and nameString aren't the same. Show 'nameString ⟷ rankedString' in the UI
+// if (!rankedStringIsName && [drawObject displayName].length) {
+// [titleString addAttribute:NSFontAttributeName value:detailsFont range:NSMakeRange(0,[titleString length])];
+// NSMutableAttributedString *attributedNameString = [[NSMutableAttributedString alloc] initWithString:[drawObject displayName]];
+// [attributedNameString setAttributes:nameAttributes range:NSMakeRange(0, [[drawObject displayName] length])];
+//
+// [attributedNameString appendAttributedString:[[[NSAttributedString alloc] initWithString:@" ⟷ " attributes:rankedNameAttributes] autorelease]];
+// // the replaceCharacters... method inserts the new string into the receiver at the start of the work (range.location and range.length are 0)
+// [titleString replaceCharactersInRange:NSMakeRange(0,0) withAttributedString:attributedNameString];
+// [attributedNameString release];
+// }
+
+ if (showDetails) {
+ NSString *detailsString = [drawObject details];
+
+ NSRange returnRange = [detailsString rangeOfString:@"\n"];
+ if (returnRange.location != NSNotFound) {
+ detailsString = [detailsString substringToIndex:returnRange.location];
+ }
+
+ detailsAttributes = [detailsAttributes mutableCopy];
+ [detailsAttributes setValue:[NSColor grayColor] forKey:NSForegroundColorAttributeName];
+
+ if (detailsString && detailsString.length && ![detailsString isEqualToString:nameString]) {
+ [titleString appendAttributedString:[[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\n%@",detailsString] attributes:detailsAttributes] autorelease]];
+ }
+ }
+
+ NSRect centerRect = rectFromSize([titleString size]);
+ centerRect.size.width = NSWidth(textDrawRect);
+ centerRect.size.height = MIN(NSHeight(textDrawRect), centerRect.size.height);
+ [titleString drawInRect:centerRectInRect(centerRect, textDrawRect)];
+}
+
+@end
+
+
+
+
diff --git a/Flat Bezel/en.lproj/InfoPlist.strings b/Flat Bezel/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Flat Bezel/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Flat Bezel/gear-black.png b/Flat Bezel/gear-black.png
new file mode 100755
index 0000000..3ebdfe6
--- /dev/null
+++ b/Flat Bezel/gear-black.png
Binary files differ
diff --git a/Flat Bezel/gear-white.png b/Flat Bezel/gear-white.png
new file mode 100755
index 0000000..169f6cb
--- /dev/null
+++ b/Flat Bezel/gear-white.png
Binary files differ
diff --git a/Flat Bezel/search-black.png b/Flat Bezel/search-black.png
new file mode 100755
index 0000000..e85640e
--- /dev/null
+++ b/Flat Bezel/search-black.png
Binary files differ
diff --git a/Flat Bezel/search-white.png b/Flat Bezel/search-white.png
new file mode 100755
index 0000000..e6048b7
--- /dev/null
+++ b/Flat Bezel/search-white.png
Binary files differ