Changeset 917


Ignore:
Timestamp:
Sep 25, 2006, 3:53:39 AM (15 years ago)
Author:
livings124
Message:

Make box size larger, as well as avoid overlap.

Location:
branches/nat-traversal
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/nat-traversal/PiecesWindowController.h

    r915 r917  
    1818   
    1919    Torrent * fTorrent;
    20     int     fNumPieces, fAcross;
    21     float   fWidth;
     20    int     fNumPieces, fAcross, fWidth, fExtraBorder;
    2221   
    2322    IBOutlet NSImageView * fImageView;
  • branches/nat-traversal/PiecesWindowController.m

    r916 r917  
    99#import "PiecesWindowController.h"
    1010
    11 #define MAX_ACROSS 18
     11#define MAX_ACROSS 20
    1212#define BETWEEN 1.0
    1313
     
    107107            fAcross = MAX_ACROSS;
    108108       
    109         fWidth = ([fExistingImage size].width - (float)(fAcross + 1) * BETWEEN) / (float)fAcross;
     109        fWidth = ([fExistingImage size].width - (fAcross + 1) * BETWEEN) / fAcross;
     110        fExtraBorder = ([fExistingImage size].width - ((fWidth + BETWEEN) * fAcross + BETWEEN)) / 2;
    110111       
    111112        [self updateView: YES];
     
    193194                }
    194195               
    195                 point = NSMakePoint((float)j * (fWidth + BETWEEN) + BETWEEN,
    196                                     (float)(fAcross - i) * (fWidth + BETWEEN) - fWidth);
     196                point = NSMakePoint(j * (fWidth + BETWEEN) + BETWEEN + fExtraBorder,
     197                                    [fExistingImage size].width - (i + 1) * (fWidth + BETWEEN) - fExtraBorder);
    197198               
    198199                [pieceImage compositeToPoint: point fromRect: rect operation: NSCompositeSourceOver];
  • branches/nat-traversal/Transmission.xcodeproj/project.pbxproj

    r903 r917  
    324324                4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TorrentCell.m; path = macosx/TorrentCell.m; sourceTree = "<group>"; };
    325325                4DCCBB3D09C3D71100D3CABF /* TorrentCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TorrentCell.h; path = macosx/TorrentCell.h; sourceTree = "<group>"; };
    326                 4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
     326                4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
    327327                4DDBB71B09E16BF100284745 /* transmissioncli.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = transmissioncli.c; path = cli/transmissioncli.c; sourceTree = "<group>"; };
    328328                4DDFDD20099A5D8E00189D81 /* DownloadBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownloadBadge.png; path = macosx/Images/DownloadBadge.png; sourceTree = "<group>"; };
  • branches/nat-traversal/macosx/English.lproj/PiecesWindow.nib/info.nib

    r904 r917  
    88        <string>446.1</string>
    99        <key>IBLockedObjects</key>
    10         <array>
    11                 <integer>5</integer>
    12         </array>
     10        <array/>
    1311        <key>IBOpenObjects</key>
    1412        <array>
Note: See TracChangeset for help on using the changeset viewer.