From: Robert Sesek Date: Wed, 28 May 2008 20:47:41 +0000 (-0400) Subject: Adding a nice gradient to the background to make the app look even prettier X-Git-Tag: 2.0~11 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=1fde6fc085765edfe208ddc26e92bf4e2401112e;p=scrabbalize.git Adding a nice gradient to the background to make the app look even prettier * English.lproj/MainMenu.nib: Add the Custion View * English.lproj/gradient.png: New file * Source/GradientBackView.m+h: New files * Scrabbalize.xcodeproj: Project updates for new files --- diff --git a/English.lproj/MainMenu.nib/designable.nib b/English.lproj/MainMenu.nib/designable.nib index c0a434f..3de012d 100644 --- a/English.lproj/MainMenu.nib/designable.nib +++ b/English.lproj/MainMenu.nib/designable.nib @@ -41,7 +41,7 @@ NSImage NSMenuCheckmark - + NSImage NSMenuMixedState @@ -56,7 +56,7 @@ 2147483647 - + @@ -67,7 +67,7 @@ 1048576 2147483647 - + @@ -76,7 +76,7 @@ 1048576 2147483647 - + @@ -87,7 +87,7 @@ 1048576 2147483647 - + @@ -96,7 +96,7 @@ 1048576 2147483647 - + submenuAction: Services @@ -115,7 +115,7 @@ 1048576 2147483647 - + @@ -124,7 +124,7 @@ 1048576 2147483647 - + @@ -133,7 +133,7 @@ 1572864 2147483647 - + @@ -142,7 +142,7 @@ 1048576 2147483647 - + @@ -153,7 +153,7 @@ 1048576 2147483647 - + @@ -162,7 +162,7 @@ 1048576 2147483647 - + _NSAppleMenu @@ -175,7 +175,7 @@ 1048576 2147483647 - + submenuAction: File @@ -188,7 +188,7 @@ 1048576 2147483647 - + @@ -197,7 +197,7 @@ 1048576 2147483647 - + @@ -206,7 +206,7 @@ 1048576 2147483647 - + submenuAction: Open Recent @@ -219,7 +219,7 @@ 1048576 2147483647 - + _NSRecentDocumentsMenu @@ -234,7 +234,7 @@ 1048576 2147483647 - + @@ -243,7 +243,7 @@ 1048576 2147483647 - + @@ -252,7 +252,7 @@ 1048576 2147483647 - + @@ -261,7 +261,7 @@ 1179648 2147483647 - + @@ -269,7 +269,7 @@ 2147483647 - + @@ -280,7 +280,7 @@ 1048576 2147483647 - + @@ -289,7 +289,7 @@ 1179648 2147483647 - + @@ -299,7 +299,7 @@ 1048576 2147483647 - + @@ -311,7 +311,7 @@ 1048576 2147483647 - + submenuAction: Edit @@ -324,7 +324,7 @@ 1048576 2147483647 - + @@ -333,7 +333,7 @@ 1179648 2147483647 - + @@ -344,7 +344,7 @@ 1048576 2147483647 - + @@ -353,7 +353,7 @@ 1048576 2147483647 - + @@ -362,7 +362,7 @@ 1048576 2147483647 - + @@ -371,7 +371,7 @@ 1048576 2147483647 - + @@ -380,7 +380,7 @@ 1048576 2147483647 - + @@ -389,7 +389,7 @@ 1048576 2147483647 - + @@ -400,7 +400,7 @@ 1048576 2147483647 - + @@ -409,7 +409,7 @@ 1048576 2147483647 - + submenuAction: Find @@ -422,7 +422,7 @@ 1048576 2147483647 - + 1 @@ -432,7 +432,7 @@ 1048576 2147483647 - + 2 @@ -442,7 +442,7 @@ 1179648 2147483647 - + 3 @@ -452,7 +452,7 @@ 1048576 2147483647 - + 7 @@ -462,7 +462,7 @@ 1048576 2147483647 - + @@ -474,7 +474,7 @@ 1048576 2147483647 - + submenuAction: Spelling and Grammar @@ -487,7 +487,7 @@ 1048576 2147483647 - + @@ -496,7 +496,7 @@ 1048576 2147483647 - + @@ -505,7 +505,7 @@ 1048576 2147483647 - + @@ -514,7 +514,7 @@ 1048576 2147483647 - + @@ -526,7 +526,7 @@ 1048576 2147483647 - + submenuAction: Substitutions @@ -539,7 +539,7 @@ 1048576 2147483647 - + 1 @@ -549,7 +549,7 @@ 1048576 2147483647 - + 2 @@ -559,7 +559,7 @@ 1179648 2147483647 - + 3 @@ -572,7 +572,7 @@ 1048576 2147483647 - + submenuAction: Speech @@ -585,7 +585,7 @@ 1048576 2147483647 - + @@ -594,7 +594,7 @@ 1048576 2147483647 - + @@ -609,7 +609,7 @@ 1048576 2147483647 - + submenuAction: Format @@ -622,7 +622,7 @@ 1048576 2147483647 - + @@ -631,7 +631,7 @@ 1179648 2147483647 - + @@ -643,7 +643,7 @@ 1048576 2147483647 - + submenuAction: View @@ -656,7 +656,7 @@ 1572864 2147483647 - + @@ -665,7 +665,7 @@ 1048576 2147483647 - + @@ -677,7 +677,7 @@ 1048576 2147483647 - + submenuAction: Window @@ -690,7 +690,7 @@ 1048576 2147483647 - + @@ -699,7 +699,7 @@ 1048576 2147483647 - + @@ -710,7 +710,7 @@ 1048576 2147483647 - + @@ -719,7 +719,7 @@ 1048576 2147483647 - + _NSWindowsMenu @@ -732,7 +732,7 @@ 1048576 2147483647 - + submenuAction: Help @@ -745,7 +745,7 @@ 1048576 2147483647 - + @@ -768,6 +768,13 @@ 256 YES + + + 268 + {{-1, 318}, {569, 38}} + + GradientBackView + 4370 @@ -961,18 +968,18 @@ QSAAAEEgAABBmAAAQZgAAA - + 266 {{9, 326}, {547, 22}} YES - + 343014976 268436480 - + YES 1 @@ -987,8 +994,8 @@ 0 search _searchFieldSearch: - - + + 138690815 0 @@ -1016,8 +1023,8 @@ _searchFieldCancel: - - + + 138690815 0 @@ -1428,7 +1435,7 @@ findWords: - + 419 @@ -1436,7 +1443,7 @@ tilesField - + 420 @@ -2055,8 +2062,9 @@ YES - + + @@ -2139,17 +2147,22 @@ 417 - + YES - + 418 - - + + + + + 421 + + @@ -2316,6 +2329,7 @@ 411.IBPluginDependency 417.IBPluginDependency 418.IBPluginDependency + 421.IBPluginDependency 5.IBPluginDependency 5.ImportedFromIB2 56.IBPluginDependency @@ -2513,6 +2527,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2568,7 +2583,7 @@ - 420 + 421 @@ -2608,6 +2623,14 @@ + + GradientBackView + NSView + + IBProjectSource + Source/GradientBackView.h + + 0 diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index 3975376..ab9968d 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/English.lproj/gradient.png b/English.lproj/gradient.png new file mode 100644 index 0000000..850bcf7 Binary files /dev/null and b/English.lproj/gradient.png differ diff --git a/Scrabbalize.xcodeproj/project.pbxproj b/Scrabbalize.xcodeproj/project.pbxproj index 9bbecc3..5549fe9 100644 --- a/Scrabbalize.xcodeproj/project.pbxproj +++ b/Scrabbalize.xcodeproj/project.pbxproj @@ -8,6 +8,8 @@ /* Begin PBXBuildFile section */ 1E1231A30DE502CE00A60AF5 /* dictionary.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1E1231A20DE502CE00A60AF5 /* dictionary.txt */; }; + 1E7EDF410DEDFBD1000660B3 /* gradient.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E7EDF3F0DEDFBD1000660B3 /* gradient.png */; }; + 1E7EDF440DEDFBD9000660B3 /* GradientBackView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E7EDF420DEDFBD9000660B3 /* GradientBackView.m */; }; 1EAAC79B0D16E9CE0058A23D /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EAAC79A0D16E9CE0058A23D /* AppController.m */; }; 1EAAC8420D16F4A40058A23D /* Word.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EAAC8410D16F4A40058A23D /* Word.m */; }; 1EAAC93C0D17129D0058A23D /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EAAC93B0D17129D0058A23D /* NSStringAdditions.m */; }; @@ -23,6 +25,9 @@ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 1E1231A20DE502CE00A60AF5 /* dictionary.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dictionary.txt; sourceTree = ""; }; + 1E7EDF400DEDFBD1000660B3 /* English */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = English; path = English.lproj/gradient.png; sourceTree = ""; }; + 1E7EDF420DEDFBD9000660B3 /* GradientBackView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GradientBackView.m; path = Source/GradientBackView.m; sourceTree = ""; }; + 1E7EDF430DEDFBD9000660B3 /* GradientBackView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GradientBackView.h; path = Source/GradientBackView.h; sourceTree = ""; }; 1EAAC7990D16E9CE0058A23D /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = Source/AppController.h; sourceTree = ""; }; 1EAAC79A0D16E9CE0058A23D /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppController.m; path = Source/AppController.m; sourceTree = ""; }; 1EAAC8400D16F4A40058A23D /* Word.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Word.h; path = Source/Word.h; sourceTree = ""; }; @@ -60,6 +65,8 @@ 1EAAC8410D16F4A40058A23D /* Word.m */, 1EAAC93A0D17129D0058A23D /* NSStringAdditions.h */, 1EAAC93B0D17129D0058A23D /* NSStringAdditions.m */, + 1E7EDF430DEDFBD9000660B3 /* GradientBackView.h */, + 1E7EDF420DEDFBD9000660B3 /* GradientBackView.m */, ); name = Classes; sourceTree = ""; @@ -114,6 +121,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 1E7EDF3F0DEDFBD1000660B3 /* gradient.png */, 1EC5B65F0D1CDCAA007D1D24 /* Scrabbalize.icns */, 1E1231A20DE502CE00A60AF5 /* dictionary.txt */, 8D1107310486CEB800E47090 /* Info.plist */, @@ -180,6 +188,7 @@ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, 1EC5B6600D1CDCAA007D1D24 /* Scrabbalize.icns in Resources */, 1E1231A30DE502CE00A60AF5 /* dictionary.txt in Resources */, + 1E7EDF410DEDFBD1000660B3 /* gradient.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -210,6 +219,7 @@ 1EAAC79B0D16E9CE0058A23D /* AppController.m in Sources */, 1EAAC8420D16F4A40058A23D /* Word.m in Sources */, 1EAAC93C0D17129D0058A23D /* NSStringAdditions.m in Sources */, + 1E7EDF440DEDFBD9000660B3 /* GradientBackView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -224,6 +234,14 @@ name = InfoPlist.strings; sourceTree = ""; }; + 1E7EDF3F0DEDFBD1000660B3 /* gradient.png */ = { + isa = PBXVariantGroup; + children = ( + 1E7EDF400DEDFBD1000660B3 /* English */, + ); + name = gradient.png; + sourceTree = ""; + }; 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { isa = PBXVariantGroup; children = ( diff --git a/Source/GradientBackView.h b/Source/GradientBackView.h new file mode 100644 index 0000000..5cd1d64 --- /dev/null +++ b/Source/GradientBackView.h @@ -0,0 +1,24 @@ +/* + * Scrabbalize + * Copyright (c) 2007-2008, Blue Static + * + * This program is free software; you can redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program; if not, + * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#import + + +@interface GradientBackView : NSView +{ +} + +@end diff --git a/Source/GradientBackView.m b/Source/GradientBackView.m new file mode 100644 index 0000000..fc4fa72 --- /dev/null +++ b/Source/GradientBackView.m @@ -0,0 +1,40 @@ +/* + * Scrabbalize + * Copyright (c) 2007-2008, Blue Static + * + * This program is free software; you can redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program; if not, + * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#import "GradientBackView.h" + + +@implementation GradientBackView + +- (id)initWithFrame:(NSRect)frame +{ + if (self = [super initWithFrame:frame]) + { + } + return self; +} + +- (void)drawRect:(NSRect)rect +{ + rect = [self bounds]; + NSImage *gradient = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"gradient" ofType:@"png"]]; + [gradient drawInRect:rect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0]; + + [[NSColor blackColor] set]; + [NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x, rect.origin.y) toPoint:NSMakePoint(rect.origin.x + rect.size.width, rect.origin.y)]; +} + +@end