From 797b1a0b71d33fcad9a151c48858456ce39023b9 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Mon, 14 Jul 2025 00:12:12 +0800 Subject: [PATCH] larger app card for iphone --- .../ViewControllers/MainFrameViewController.m | 17 +++++++++++++++++ VoidLink/mul.lproj/iPhone.xcstrings | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index e627585d..c840c123 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -2020,6 +2020,23 @@ static NSMutableSet* hostList; return cell; } +- (CGSize)collectionView:(UICollectionView *)collectionView + layout:(UICollectionViewLayout *)collectionViewLayout + sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + CGSize cellSize; + if([self isIPhone]) cellSize.height = 0.365*MIN(CGRectGetHeight([[UIScreen mainScreen] bounds]),CGRectGetWidth([[UIScreen mainScreen] bounds])); + else cellSize.height = 0.272*MIN(CGRectGetHeight([[UIScreen mainScreen] bounds]),CGRectGetWidth([[UIScreen mainScreen] bounds])); + TemporaryApp* app = _sortedAppList[indexPath.row]; + UIAppView* appView = [[UIAppView alloc] initWithApp:app cache:_boxArtCache andCallback:self]; + + cellSize.width = cellSize.height * (appView + .bounds.size.width/appView + .bounds.size.height); + // cardSize.width = + + return cellSize; +} + - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 1; // App collection only } diff --git a/VoidLink/mul.lproj/iPhone.xcstrings b/VoidLink/mul.lproj/iPhone.xcstrings index d7694217..a6c47209 100644 --- a/VoidLink/mul.lproj/iPhone.xcstrings +++ b/VoidLink/mul.lproj/iPhone.xcstrings @@ -2315,6 +2315,12 @@ "value" : "Audio Configuration" } }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "声道配置" + } + }, "zh-Hant" : { "stringUnit" : { "state" : "translated",