eswick / appcenter

Add apps as pages in Control Center
Other
34 stars 8 forks source link

Make app page scale relative to screen size #12

Closed conath closed 7 years ago

conath commented 7 years ago

Code needed in ManualLayout.xm

+(CGFloat)defaultAppPageScale {
  return (1.0 - [ACManualLayout ccEdgeSpacing]/[ACManualLayout screenSize].width)*0.909;
}

Code needed in ManualLayout.h

+(CGFloat)defaultAppPageScale;

Then in Tweak.xm change the lines that calculate the scale to call [ACManualLayout defaultAppPageScale] instead.

conath commented 7 years ago

@eswick I've added the above code in commit 50efa74. This seems to have made the app pages slightly larger on 4.7" and 5.5" devices. In #17 I mention a way for the user to customize this: an app page scale slider in Settings.app bundle for the tweak.