Changeset 3798

Show
Ignore:
Timestamp:
07/28/08 01:04:58 (1 month ago)
Author:
timothy
Message:

Make the label views round to the nearest pixel to prevent blurry text.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Mobile/Views/CQConnectionTableCell.m

    r3796 r3798  
    192192        frame.size = [_iconImageView sizeThatFits:_iconImageView.bounds.size]; 
    193193        frame.origin.x = ICON_LEFT_MARGIN; 
    194         frame.origin.y = (contentRect.size.height / 2.) - (frame.size.height / 2.); 
     194        frame.origin.y = round((contentRect.size.height / 2.) - (frame.size.height / 2.)); 
    195195        _iconImageView.frame = frame; 
    196196 
     
    203203        frame = _timeLabel.frame; 
    204204        frame.size = [_timeLabel sizeThatFits:_timeLabel.bounds.size]; 
    205         frame.origin.y = (contentRect.size.height / 2.) - (frame.size.height / 2.); 
     205        frame.origin.y = round((contentRect.size.height / 2.) - (frame.size.height / 2.)); 
    206206 
    207207        if( self.editing ) 
     
    215215        frame.size = [_serverLabel sizeThatFits:_serverLabel.bounds.size]; 
    216216        frame.origin.x = CGRectGetMaxX(_iconImageView.frame) + ICON_RIGHT_MARGIN; 
    217         frame.origin.y = (contentRect.size.height / 2.) - frame.size.height + 3.
     217        frame.origin.y = round((contentRect.size.height / 2.) - frame.size.height + 3.)
    218218        frame.size.width = _timeLabel.frame.origin.x - frame.origin.x - TEXT_RIGHT_MARGIN; 
    219219        _serverLabel.frame = frame; 
     
    222222        frame.size = [_nicknameLabel sizeThatFits:_nicknameLabel.bounds.size]; 
    223223        frame.origin.x = CGRectGetMaxX(_iconImageView.frame) + ICON_RIGHT_MARGIN; 
    224         frame.origin.y = (contentRect.size.height / 2.); 
     224        frame.origin.y = round(contentRect.size.height / 2.); 
    225225        frame.size.width = _timeLabel.frame.origin.x - frame.origin.x - TEXT_RIGHT_MARGIN; 
    226226        _nicknameLabel.frame = frame;