Browse Source

fix %groups

tags/v1.1.0
Viggo Lekdorf 4 years ago
parent
commit
d3937dbc4f
2 changed files with 70 additions and 72 deletions
  1. +68
    -70
      Tweak.x
  2. +2
    -2
      kageprefs/Resources/Root.plist

+ 68
- 70
Tweak.x View File

@property (nonatomic,retain) UIView * controlCenterGrabberView; @property (nonatomic,retain) UIView * controlCenterGrabberView;
@end @end


@interface SBDashBoardTeachableMomentsContainerView {
}

@property (nonatomic,retain) UIView * controlCenterGrabberView;
@end

#ifndef kCFCoreFoundationVersionNumber_iOS_13_0 #ifndef kCFCoreFoundationVersionNumber_iOS_13_0
#define kCFCoreFoundationVersionNumber_iOS_13_0 1665.15 #define kCFCoreFoundationVersionNumber_iOS_13_0 1665.15
#endif #endif


#define kSLSystemVersioniOS13 kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_13_0 #define kSLSystemVersioniOS13 kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_13_0


// HIDE CC GRABBER START //
%hook CSTeachableMomentsContainerView
- (void)layoutSubviews {
if (enabled && hideCCGrabber) {
[self.controlCenterGrabberView setHidden:YES];
}
else {
[self.controlCenterGrabberView setHidden:NO];
}
return %orig;
}
%end
// HIDE CC GRABBER END //
%group universal


// QUICK ACTIONS BG START // // QUICK ACTIONS BG START //
%hook UICoverSheetButton %hook UICoverSheetButton
%end %end
// HIDE LABELS END // // HIDE LABELS END //


// GRID SWITCHER START //
%hook SBAppSwitcherSettings
- (void)setGridSwitcherPageScale:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 0.4;
}
%orig;
}

- (void)setGridSwitcherHorizontalInterpageSpacingPortrait:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 25.5;
}
%orig;
}

- (void)setGridSwitcherHorizontalInterpageSpacingLandscape:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 11.6;
}
%orig;
}

- (void)setGridSwitcherVerticalNaturalSpacingPortrait:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 42;
}
%orig;
}

- (void)setGridSwitcherVerticalNaturalSpacingLandscape:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 38;
}
%orig;
}

- (void)setSwitcherStyle:(long long)arg1 {
if (enabled && gridSwitcher) {
arg1 = 2;
}
%orig;
}
%end
// GRID SWITCHER END //

// NO LS BATTERY START //
%hook CSCoverSheetViewController
- (void)_transitionChargingViewToVisible:(bool)arg1 showBattery:(bool)arg2 animated:(bool)arg3 {
if (enabled && hideLSBatt) {
arg1 = 0;
}
%orig;
}
%end
// NO LS BATTERY END //

%end // end universal group

// stuff that only works on iOS 13 // stuff that only works on iOS 13
%group ios13 %group ios13




%end // end ios12 group %end // end ios12 group


// GRID SWITCHER START //
%hook SBAppSwitcherSettings
- (void)setGridSwitcherPageScale:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 0.4;
}
%orig;
}

- (void)setGridSwitcherHorizontalInterpageSpacingPortrait:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 25.5;
}
%orig;
}

- (void)setGridSwitcherHorizontalInterpageSpacingLandscape:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 11.6;
}
%orig;
}

- (void)setGridSwitcherVerticalNaturalSpacingPortrait:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 42;
}
%orig;
}

- (void)setGridSwitcherVerticalNaturalSpacingLandscape:(double)arg1 {
if (enabled && gridSwitcher) {
arg1 = 38;
}
%orig;
}

- (void)setSwitcherStyle:(long long)arg1 {
if (enabled && gridSwitcher) {
arg1 = 2;
}
%orig;
}
%end
// GRID SWITCHER END //

// NO LS BATTERY START //
%hook CSCoverSheetViewController
- (void)_transitionChargingViewToVisible:(bool)arg1 showBattery:(bool)arg2 animated:(bool)arg3 {
if (enabled && hideLSBatt) {
arg1 = 0;
}
%orig;
}
%end
// NO LS BATTERY END //

// LISTENERS // LISTENERS
%ctor { %ctor {
%init(universal);
// check iOS version // check iOS version
if (kSLSystemVersioniOS13) { if (kSLSystemVersioniOS13) {
%init(ios13); %init(ios13);

+ 2
- 2
kageprefs/Resources/Root.plist View File

<key>key</key> <key>key</key>
<string>hideQuickActionsBG</string> <string>hideQuickActionsBG</string>
<key>label</key> <key>label</key>
<string>Hide Quick Actions BG*</string>
<string>Hide Quick Actions BG (iPhone X)*</string>
<key>PostNotification</key> <key>PostNotification</key>
<string>com.yaypixxo.kage/preferences.changed</string> <string>com.yaypixxo.kage/preferences.changed</string>
</dict> </dict>
<key>key</key> <key>key</key>
<string>statusBarShowTimeLS</string> <string>statusBarShowTimeLS</string>
<key>label</key> <key>label</key>
<string>Time in LS Status Bar</string>
<string>Time in LS Status Bar (iPhone X)</string>
<key>PostNotification</key> <key>PostNotification</key>
<string>com.yaypixxo.kage/preferences.changed</string> <string>com.yaypixxo.kage/preferences.changed</string>
</dict> </dict>

Loading…
Cancel
Save