Revision: 5373
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5373&view=rev
Author:   hofman
Date:     2009-05-10 12:10:37 +0000 (Sun, 10 May 2009)

Log Message:
-----------
draw gradient taken from scrollers in header popup, it's now only used in the 
scrollview plackard views

Modified Paths:
--------------
    trunk/BDSKHeaderPopUpButtonCell.h
    trunk/BDSKHeaderPopUpButtonCell.m
    trunk/NSScrollView_SKExtensions.m
    trunk/Skim.xcodeproj/project.pbxproj

Added Paths:
-----------
    trunk/Images/Scroller_Background.tiff
    trunk/Images/Scroller_Divider.tiff

Modified: trunk/BDSKHeaderPopUpButtonCell.h
===================================================================
--- trunk/BDSKHeaderPopUpButtonCell.h   2009-05-10 09:42:12 UTC (rev 5372)
+++ trunk/BDSKHeaderPopUpButtonCell.h   2009-05-10 12:10:37 UTC (rev 5373)
@@ -39,7 +39,5 @@
 #import <Cocoa/Cocoa.h>
 
 
-...@interface BDSKHeaderPopUpButtonCell : NSPopUpButtonCell {
-       NSTableHeaderCell *headerCell;
-}
+...@interface BDSKHeaderPopUpButtonCell : NSPopUpButtonCell
 @end

Modified: trunk/BDSKHeaderPopUpButtonCell.m
===================================================================
--- trunk/BDSKHeaderPopUpButtonCell.m   2009-05-10 09:42:12 UTC (rev 5372)
+++ trunk/BDSKHeaderPopUpButtonCell.m   2009-05-10 12:10:37 UTC (rev 5373)
@@ -38,50 +38,19 @@
 
 #import "BDSKHeaderPopUpButtonCell.h"
 #import "NSImage_SKExtensions.h"
-#import "NSGeometry_SKExtensions.h"
 
 @implementation BDSKHeaderPopUpButtonCell
 
 - (id)initTextCell:(NSString *)stringValue pullsDown:(BOOL)pullDown {
        if ([super initTextCell:@"" pullsDown:NO]) {
-               
                [self setBordered:NO];
                [self setEnabled:YES];
                [self setUsesItemFromMenu:YES];
                [self setRefusesFirstResponder:YES];
-               
-               // we keep the headercell for drawing
-               headerCell = [[NSTableHeaderCell allocWithZone:[self zone]] 
initTextCell:@""];
-               
-        // we could pass more properties
-               [headerCell setFont:[self font]];
        }
        return self;
 }
 
-- (id)copyWithZone:(NSZone *)aZone {
-       BDSKHeaderPopUpButtonCell *copy = [super copyWithZone:aZone];
-    copy->headerCell = [headerCell copyWithZone:aZone];
-    return copy;
-}
-
-- (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
-        headerCell = [[decoder decodeObjectForKey:@"headerCell"] retain];
-    }
-    return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
-    [super encodeWithCoder:coder];
-    [coder encodeObject:headerCell forKey:@"headerCell"];
-}
-
-- (void)dealloc {
-       [headerCell release];
-       [super dealloc];
-}
-
 - (NSSize)cellSize {
        NSSize size = [super cellSize];
        size.width -= 22.0 + 2 * [self controlSize];
@@ -89,10 +58,10 @@
 }
 
 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
-       // let the headercell draw the gradient background
-       [headerCell setState:[self isHighlighted]];
-       [headerCell setHighlighted:[self isHighlighted]];
-       [headerCell drawWithFrame:cellFrame inView:controlView];
+    NSRect bgRect, divRect, srcRect = NSMakeRect(0.0, 0.0, 1.0, 15.0);
+    NSDivideRect(cellFrame, &divRect, &bgRect, 1.0, NSMaxXEdge);
+    [[NSImage imageNamed:@"Scroller_Background"] drawFlipped:[controlView 
isFlipped] inRect:bgRect fromRect:srcRect operation:NSCompositeSourceOver 
fraction:1.0];
+    [[NSImage imageNamed:@"Scroller_Divider"] drawFlipped:[controlView 
isFlipped] inRect:divRect fromRect:srcRect operation:NSCompositeSourceOver 
fraction:1.0];
     [super drawWithFrame:cellFrame inView:controlView];
 }    
 

Added: trunk/Images/Scroller_Background.tiff
===================================================================
(Binary files differ)


Property changes on: trunk/Images/Scroller_Background.tiff
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Images/Scroller_Divider.tiff
===================================================================
(Binary files differ)


Property changes on: trunk/Images/Scroller_Divider.tiff
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m   2009-05-10 09:42:12 UTC (rev 5372)
+++ trunk/NSScrollView_SKExtensions.m   2009-05-10 12:10:37 UTC (rev 5373)
@@ -78,13 +78,13 @@
         NSView *view;
         NSScroller *horizScroller = [self horizontalScroller];
         NSRect viewFrame, horizScrollerFrame = [horizScroller frame];
-        CGFloat height = NSHeight(horizScrollerFrame) - 1.0, totalWidth = 0.0;
+        CGFloat height = NSHeight(horizScrollerFrame), totalWidth = 0.0;
         BDSKEdgeView *edgeView = (BDSKEdgeView *)[[[placards lastObject] 
superview] superview];
         
         if ([edgeView isDescendantOf:self] == NO) {
             edgeView = [[[BDSKEdgeView alloc] init] autorelease];
             [edgeView setEdgeColor:[NSColor colorWithCalibratedWhite:0.75 
alpha:1.0]];
-            [edgeView setEdges:BDSKMinXEdgeMask | BDSKMaxYEdgeMask];
+            [edgeView setEdges:BDSKMinXEdgeMask];
             [self addSubview:edgeView];
         }
         

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2009-05-10 09:42:12 UTC (rev 
5372)
+++ trunk/Skim.xcodeproj/project.pbxproj        2009-05-10 12:10:37 UTC (rev 
5373)
@@ -37,6 +37,8 @@
                8D15AC310486D014006FF6A4 /* SKPDFDocument.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* SKPDFDocument.m */; 
settings = {ATTRIBUTES = (); }; };
                8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = 
{ATTRIBUTES = (); }; };
                8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; 
};
+               CE0458310FB6FAB0003CAF5D /* Scroller_Divider.tiff in Resources 
*/ = {isa = PBXBuildFile; fileRef = CE04582F0FB6FAB0003CAF5D /* 
Scroller_Divider.tiff */; };
+               CE0458320FB6FAB0003CAF5D /* Scroller_Background.tiff in 
Resources */ = {isa = PBXBuildFile; fileRef = CE0458300FB6FAB0003CAF5D /* 
Scroller_Background.tiff */; };
                CE0463CB0B84D24300C11E4A /* SKApplication.m in Sources */ = 
{isa = PBXBuildFile; fileRef = CE0463CA0B84D24300C11E4A /* SKApplication.m */; 
};
                CE05A7380E9024ED0060BB07 /* 
SKPresentationOptionsSheetController.m in Sources */ = {isa = PBXBuildFile; 
fileRef = CE05A7360E9024ED0060BB07 /* SKPresentationOptionsSheetController.m 
*/; };
                CE05A86F0E90ED950060BB07 /* SKTextFieldSheetController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CE05A86D0E90ED950060BB07 /* 
SKTextFieldSheetController.m */; };
@@ -462,6 +464,8 @@
                45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; 
sourceTree = "<group>"; };
                8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = 
Info.plist; sourceTree = "<group>"; };
                8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = 
PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; 
path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; };
+               CE04582F0FB6FAB0003CAF5D /* Scroller_Divider.tiff */ = {isa = 
PBXFileReference; lastKnownFileType = image.tiff; path = Scroller_Divider.tiff; 
sourceTree = "<group>"; };
+               CE0458300FB6FAB0003CAF5D /* Scroller_Background.tiff */ = {isa 
= PBXFileReference; lastKnownFileType = image.tiff; path = 
Scroller_Background.tiff; sourceTree = "<group>"; };
                CE0463C90B84D24300C11E4A /* SKApplication.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SKApplication.h; sourceTree = "<group>"; };
                CE0463CA0B84D24300C11E4A /* SKApplication.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SKApplication.m; sourceTree = "<group>"; };
                CE05A7350E9024ED0060BB07 /* 
SKPresentationOptionsSheetController.h */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SKPresentationOptionsSheetController.h; sourceTree = "<group>"; };
@@ -1512,6 +1516,8 @@
                                CEAFFD9C0C40F2A800C3ECBB /* ToolbarLines.tiff 
*/,
                                CE6DC8890D68C657003A072F /* 
ToolbarMoveTool.tiff */,
                                CE6A5BB10D663771003B7CC3 /* ToolbarPrint.tiff 
*/,
+                               CE04582F0FB6FAB0003CAF5D /* 
Scroller_Divider.tiff */,
+                               CE0458300FB6FAB0003CAF5D /* 
Scroller_Background.tiff */,
                                CE51632C0EAB5EE2009FA237 /* Segment_Cap.tiff */,
                                CE51632E0EAB5EE2009FA237 /* 
Segment_CapPress.tiff */,
                                CE5163310EAB5EE2009FA237 /* 
Segment_Divider.tiff */,
@@ -1949,6 +1955,8 @@
                                CE51633D0EAB5EE2009FA237 /* 
Segment_Divider.tiff in Resources */,
                                CEE0F6C20EBB4743000A7A8C /* 
ConversionProgressWindow.nib in Resources */,
                                CEB34A530F5C1B7E0037E086 /* dsa_pub.pem in 
Resources */,
+                               CE0458310FB6FAB0003CAF5D /* 
Scroller_Divider.tiff in Resources */,
+                               CE0458320FB6FAB0003CAF5D /* 
Scroller_Background.tiff in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to