Skip to content

Commit 38bea54

Browse files
committed
Auto-build → Source update
1 parent 2e1e66d commit 38bea54

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

‎antidarkswordprefs/Resources/Root.plist‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
<key>cell</key>
244244
<string>PSButtonCell</string>
245245
<key>label</key>
246-
<string>Reset to Defaults</string>
246+
<string>Reset Settings to Defaults</string>
247247
<key>action</key>
248248
<string>resetToDefaults</string>
249249
<key>isDestructive</key>

‎antidarkswordprefs/RootListController.m‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -948,12 +948,30 @@ - (NSArray *)autoProtectedItemsForLevel:(NSInteger)level {
948948
return items;
949949
}
950950
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
951-
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath]; PSSpecifier *spec = [self specifierAtIndexPath:indexPath];
952-
if (spec->action == @selector(resetToDefaults)) { if (@available(iOS 13.0, *)) cell.textLabel.textColor = [UIColor systemRedColor]; else cell.textLabel.textColor = [UIColor redColor]; }
951+
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
952+
PSSpecifier *spec = [self specifierAtIndexPath:indexPath];
953+
954+
// Center and color the Reset button
955+
if (spec->action == @selector(resetToDefaults)) {
956+
if (@available(iOS 13.0, *)) cell.textLabel.textColor = [UIColor systemRedColor];
957+
else cell.textLabel.textColor = [UIColor redColor];
958+
cell.textLabel.textAlignment = NSTextAlignmentCenter;
959+
}
960+
961+
// Color the Donate button green
962+
if (spec->action == @selector(openVenmo)) {
963+
if (@available(iOS 13.0, *)) cell.textLabel.textColor = [UIColor systemGreenColor];
964+
else cell.textLabel.textColor = [UIColor greenColor];
965+
}
966+
953967
if ([[spec propertyForKey:@"key"] isEqualToString:@"enabled"]) {
954968
if ([cell respondsToSelector:@selector(control)]) {
955969
UISwitch *toggle = (UISwitch *)[cell control];
956-
if ([toggle isKindOfClass:[UISwitch class]]) { if (@available(iOS 13.0, *)) toggle.backgroundColor = [UIColor systemRedColor]; else toggle.backgroundColor = [UIColor redColor]; toggle.layer.cornerRadius = 15.5; }
970+
if ([toggle isKindOfClass:[UISwitch class]]) {
971+
if (@available(iOS 13.0, *)) toggle.backgroundColor = [UIColor systemRedColor];
972+
else toggle.backgroundColor = [UIColor redColor];
973+
toggle.layer.cornerRadius = 15.5;
974+
}
957975
}
958976
}
959977
id ruleTypeObj = [spec propertyForKey:@"ruleType"];

0 commit comments

Comments
 (0)