Changeset 292

Show
Ignore:
Timestamp:
02/11/08 13:49:26 (1 year ago)
Author:
wolf
Message:

[NEW] BezelBanner? 1.0.1: fix bug on 10.5 where line would be clipped.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cocoa/BezelBanner/BezelBanner.xcodeproj/project.pbxproj

    r128 r292  
    1010                795A7F92099D0E3600450061 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 795A7F91099D0E3600450061 /* AppController.m */; }; 
    1111                79A967B30A5A203700567299 /* BezelBannerWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A967B20A5A203700567299 /* BezelBannerWindow.m */; }; 
     12                79C94B500D612FC500C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.m in Sources */ = {isa = PBXBuildFile; fileRef = 79C94B4E0D612FC400C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.m */; }; 
    1213                8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; 
    1314                8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; 
     
    2930                79A967B10A5A203700567299 /* BezelBannerWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BezelBannerWindow.h; sourceTree = "<group>"; }; 
    3031                79A967B20A5A203700567299 /* BezelBannerWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BezelBannerWindow.m; sourceTree = "<group>"; }; 
     32                79C94B4E0D612FC400C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBezierPath+bezierPathWithRoundedRect.m"; sourceTree = "<group>"; }; 
     33                79C94B4F0D612FC500C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBezierPath+bezierPathWithRoundedRect.h"; sourceTree = "<group>"; }; 
    3134                8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; 
    3235                8D1107320486CEB800E47090 /* BezelBanner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BezelBanner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 
     
    5255                                79A967B10A5A203700567299 /* BezelBannerWindow.h */, 
    5356                                79A967B20A5A203700567299 /* BezelBannerWindow.m */, 
     57                                79C94B4F0D612FC500C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.h */, 
     58                                79C94B4E0D612FC400C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.m */, 
    5459                        ); 
    5560                        name = Classes; 
     
    149154                        isa = PBXProject; 
    150155                        buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BezelBanner" */; 
     156                        compatibilityVersion = "Xcode 2.4"; 
    151157                        hasScannedForEncodings = 1; 
    152158                        mainGroup = 29B97314FDCFA39411CA2CEA /* BezelBanner */; 
    153159                        projectDirPath = ""; 
     160                        projectRoot = ""; 
    154161                        targets = ( 
    155162                                8D1107260486CEB800E47090 /* BezelBanner */, 
     
    178185                                795A7F92099D0E3600450061 /* AppController.m in Sources */, 
    179186                                79A967B30A5A203700567299 /* BezelBannerWindow.m in Sources */, 
     187                                79C94B500D612FC500C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.m in Sources */, 
    180188                        ); 
    181189                        runOnlyForDeploymentPostprocessing = 0; 
  • trunk/cocoa/BezelBanner/BezelBanner.xcodeproj/wolf.pbxuser

    r128 r292  
    11// !$*UTF8*$! 
    22{ 
     3        089C165DFE840E0CC02AAC07 /* English */ = { 
     4                uiCtxt = { 
     5                        sepNavIntBoundsRect = "{{0, 0}, {976, 793}}"; 
     6                        sepNavSelRange = "{100, 0}"; 
     7                        sepNavVisRange = "{0, 100}"; 
     8                        sepNavWindowFrame = "{{498, 235}, {1035, 897}}"; 
     9                }; 
     10        }; 
    311        29B97313FDCFA39411CA2CEA /* Project object */ = { 
     12                activeArchitecture = i386; 
    413                activeBuildConfigurationName = Release; 
    514                activeExecutable = 79A967970A5A1F8300567299 /* BezelBanner */; 
     
    2231                                        243, 
    2332                                        20, 
    24                                         48.1626
     33                                        48
    2534                                        43, 
    2635                                        43, 
     
    3746                                ); 
    3847                        }; 
    39                         PBXPerProjectTemplateStateSaveDate = 173678467
    40                         PBXWorkspaceStateSaveDate = 173678467
     48                        PBXPerProjectTemplateStateSaveDate = 224472508
     49                        PBXWorkspaceStateSaveDate = 224472508
    4150                }; 
    4251                sourceControlManager = 79A9679D0A5A1F8C00567299 /* Source Control */; 
     
    6271        79A967970A5A1F8300567299 /* BezelBanner */ = { 
    6372                isa = PBXExecutable; 
    64                 activeArgIndex = 2147483647; 
    6573                activeArgIndices = ( 
    6674                ); 
     
    6876                ); 
    6977                autoAttachOnCrash = 1; 
     78                breakpointsEnabled = 0; 
    7079                configStateDict = { 
    7180                }; 
     
    106115        79A967B20A5A203700567299 /* BezelBannerWindow.m */ = { 
    107116                uiCtxt = { 
    108                         sepNavIntBoundsRect = "{{0, 0}, {938, 2352}}"; 
    109                         sepNavSelRange = "{5786, 0}"; 
     117                        sepNavIntBoundsRect = "{{0, 0}, {918, 1806}}"; 
     118                        sepNavSelRange = "{2655, 0}"; 
     119                        sepNavVisRange = "{2217, 1528}"; 
    110120                        sepNavVisRect = "{{0, 0}, {938, 762}}"; 
    111                         sepNavWindowFrame = "{{407, 43}, {977, 835}}"; 
     121                        sepNavWindowFrame = "{{552, 445}, {977, 835}}"; 
     122                }; 
     123        }; 
     124        79C94B4E0D612FC400C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.m */ = { 
     125                uiCtxt = { 
     126                        sepNavIntBoundsRect = "{{0, 0}, {976, 793}}"; 
     127                        sepNavSelRange = "{0, 50}"; 
     128                        sepNavVisRange = "{0, 1710}"; 
     129                        sepNavWindowFrame = "{{452, 277}, {1035, 897}}"; 
     130                }; 
     131        }; 
     132        79C94B4F0D612FC500C7EB07 /* NSBezierPath+bezierPathWithRoundedRect.h */ = { 
     133                uiCtxt = { 
     134                        sepNavIntBoundsRect = "{{0, 0}, {976, 793}}"; 
     135                        sepNavSelRange = "{0, 0}"; 
     136                        sepNavVisRange = "{0, 277}"; 
     137                        sepNavWindowFrame = "{{475, 256}, {1035, 897}}"; 
    112138                }; 
    113139        }; 
     
    118144                ); 
    119145        }; 
     146        8D1107310486CEB800E47090 /* Info.plist */ = { 
     147                uiCtxt = { 
     148                        sepNavIntBoundsRect = "{{0, 0}, {976, 793}}"; 
     149                        sepNavSelRange = "{412, 0}"; 
     150                        sepNavVisRange = "{0, 848}"; 
     151                        sepNavWindowFrame = "{{429, 298}, {1035, 897}}"; 
     152                }; 
     153        }; 
    120154} 
  • trunk/cocoa/BezelBanner/BezelBannerWindow.m

    r128 r292  
    11#import "BezelBannerWindow.h" 
    2  
    3 //      +bezierPathWithRoundedRect: is mostly stolen from Growl, so read Growl License.txt for the terms (BSD-style). 
    4 @interface NSBezierPath (bezierPathWithRoundedRect) 
    5 + (NSBezierPath*) bezierPathWithRoundedRect:(NSRect)rect radius:(float)radius; 
    6 @end 
    7 @implementation NSBezierPath (bezierPathWithRoundedRect) 
    8 + (NSBezierPath*) bezierPathWithRoundedRect:(NSRect)rect radius:(float)radius { 
    9         NSRect irect = NSInsetRect( rect, radius, radius ); 
    10         float minX = NSMinX( irect ); 
    11         float minY = NSMinY( irect ); 
    12         float maxX = NSMaxX( irect ); 
    13         float maxY = NSMaxY( irect ); 
    14          
    15         NSBezierPath *path = [NSBezierPath bezierPath]; 
    16          
    17         [path appendBezierPathWithArcWithCenter:NSMakePoint( minX, minY ) 
    18                                                                          radius:radius 
    19                                                                  startAngle:180.0f 
    20                                                                    endAngle:270.0f]; 
    21          
    22         [path appendBezierPathWithArcWithCenter:NSMakePoint( maxX, minY ) 
    23                                                                          radius:radius 
    24                                                                  startAngle:270.0f 
    25                                                                    endAngle:360.0f]; 
    26          
    27         [path appendBezierPathWithArcWithCenter:NSMakePoint( maxX, maxY ) 
    28                                                                          radius:radius 
    29                                                                  startAngle:0.0f 
    30                                                                    endAngle:90.0f]; 
    31          
    32         [path appendBezierPathWithArcWithCenter:NSMakePoint( minX, maxY ) 
    33                                                                          radius:radius 
    34                                                                  startAngle:90.0f 
    35                                                                    endAngle:180.0f]; 
    36          
    37         [path closePath]; 
    38          
    39         return path; 
    40 
    41 @end 
     2#import "NSBezierPath+bezierPathWithRoundedRect.h" 
    423 
    434@implementation BezelBannerWindow 
     
    7637                stringSize = [string_ sizeWithAttributes:textAttributes]; 
    7738                fontSize -= 2.0; 
    78         } while (stringSize.width > maxStringWidth); 
     39        } while ((stringSize.width + kLeftWindowMargin*2 + kRightWindowMargin*2) >= maxStringWidth); 
    7940         
    8041        //      Pad out the text size to arrive at the desired window size. 
  • trunk/cocoa/BezelBanner/Info.plist

    r128 r292  
    1010        <string></string> 
    1111        <key>CFBundleIdentifier</key> 
    12         <string>com.yourcompany.BezelBanner</string> 
     12        <string>com.rentzsch.BezelBanner</string> 
    1313        <key>CFBundleInfoDictionaryVersion</key> 
    1414        <string>6.0</string> 
     
    2020        <string>????</string> 
    2121        <key>CFBundleVersion</key> 
    22         <string>1.0</string> 
     22        <string>1.0.1</string> 
    2323        <key>NSMainNibFile</key> 
    2424        <string>MainMenu</string>