]> git.saurik.com Git - cydia.git/commitdiff
Hide folder and package count on section cells when editing
authorRyan Petrich <rpetrich@gmail.com>
Wed, 9 Feb 2011 16:28:40 +0000 (09:28 -0700)
committerGrant Paul <chpwn@chpwn.com>
Sun, 10 Jul 2011 10:47:09 +0000 (03:47 -0700)
MobileCydia.mm

index 625e34d938f4620dbfaa49cbe5a625552e8abcd7..2744ea3c3e343908e077c8d0052cf72492c45bf2 100644 (file)
@@ -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_];
 }