Changeset 2711


Ignore:
Timestamp:
Aug 10, 2007, 5:55:09 PM (15 years ago)
Author:
livings124
Message:

adjust FileBrowserCell? layout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileBrowserCell.m

    r2710 r2711  
    2626#import "StringAdditions.h"
    2727
    28 #define PADDING_BEFORE_IMAGE 2.0
     28#define PADDING_HORIZONAL 2.0
    2929#define IMAGE_FOLDER_SIZE 16.0
    3030#define IMAGE_ICON_SIZE 32.0
    3131#define PADDING_BETWEEN_IMAGE_AND_TITLE 4.0
    32 #define PADDING_ABOVE_TITLE_REG 1.0
    33 #define PADDING_BELOW_STATUS_REG 1.0
    34 #define PADDING_AFTER_TITLE 1.0
     32#define PADDING_ABOVE_TITLE_REG 2.0
     33#define PADDING_BELOW_STATUS_REG 2.0
    3534
    3635@interface FileBrowserCell (Private)
     
    7271    if (![[[self objectValue] objectForKey: @"IsFolder"] boolValue])
    7372    {
    74         result.origin.x += PADDING_BEFORE_IMAGE + IMAGE_ICON_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
     73        result.origin.x += PADDING_HORIZONAL + IMAGE_ICON_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
    7574        result.origin.y += PADDING_ABOVE_TITLE_REG;
    7675    }
    7776    else
    7877    {
    79         result.origin.x += PADDING_BEFORE_IMAGE + IMAGE_FOLDER_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
     78        result.origin.x += PADDING_HORIZONAL + IMAGE_FOLDER_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
    8079        result.origin.y += (result.size.height - titleSize.height) * 0.5;
    8180    }
    8281    result.size = titleSize;
    83     result.size.width = MIN(result.size.width, NSMaxX(bounds) - result.origin.x - PADDING_AFTER_TITLE);
     82    result.size.width = MIN(result.size.width, NSMaxX(bounds) - result.origin.x - PADDING_HORIZONAL);
    8483   
    8584    return result;
     
    9695    NSRect result = bounds;
    9796   
    98     result.origin.x += PADDING_BEFORE_IMAGE + IMAGE_ICON_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
     97    result.origin.x += PADDING_HORIZONAL + IMAGE_ICON_SIZE + PADDING_BETWEEN_IMAGE_AND_TITLE;
    9998    result.origin.y += result.size.height - PADDING_BELOW_STATUS_REG - statusSize.height;
    10099   
    101100    result.size = statusSize;
    102     result.size.width = MIN(result.size.width, NSMaxX(bounds) - result.origin.x - PADDING_AFTER_TITLE);
     101    result.size.width = MIN(result.size.width, NSMaxX(bounds) - result.origin.x - PADDING_HORIZONAL);
    103102   
    104103    return result;
     
    109108    NSRect result = bounds;
    110109   
    111     result.origin.x += PADDING_BEFORE_IMAGE;
     110    result.origin.x += PADDING_HORIZONAL;
    112111   
    113112    const float IMAGE_SIZE = [[[self objectValue] objectForKey: @"IsFolder"] boolValue] ? IMAGE_FOLDER_SIZE : IMAGE_ICON_SIZE;
Note: See TracChangeset for help on using the changeset viewer.