From 3edfa4356917f592513b82322a784fdd4b48cc01 Mon Sep 17 00:00:00 2001 From: Ryan Petrich Date: Wed, 9 Feb 2011 09:28:40 -0700 Subject: [PATCH] Hide folder and package count on section cells when editing --- MobileCydia.mm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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_]; } -- 2.50.0