From: Ryan Petrich Date: Wed, 9 Feb 2011 16:28:40 +0000 (-0700) Subject: Hide folder and package count on section cells when editing X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/3edfa4356917f592513b82322a784fdd4b48cc01 Hide folder and package count on section cells when editing --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 625e34d9..2744ea3c 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5813,23 +5813,23 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) drawContentRect:(CGRect)rect { bool highlighted(highlighted_ && !editing_); - [icon_ drawInRect:CGRectMake(8, 7, 32, 32)]; - - if (highlighted) - UISetColor(White_); - float width(rect.size.width); + float left(8); if (editing_) - width -= 87; + width -= 117; + else { + width -= 70; + [icon_ drawInRect:CGRectMake(8, 7, 32, 32)]; + left += 40; + } - if (!highlighted) - UISetColor(Black_); - [name_ drawAtPoint:CGPointMake(48, 9) forWidth:(width - 70) withFont:Font22Bold_ lineBreakMode:UILineBreakModeTailTruncation]; + UISetColor(highlighted ? White_ : Black_); + [name_ drawAtPoint:CGPointMake(left, 9) forWidth:width withFont:Font22Bold_ lineBreakMode:UILineBreakModeTailTruncation]; CGSize size = [count_ sizeWithFont:Font14_]; UISetColor(White_); - if (count_ != nil) + if (count_ != nil && !editing_) [count_ drawAtPoint:CGPointMake(13 + (29 - size.width) / 2, 16) withFont:Font12Bold_]; }