visibility improvements

This commit is contained in:
TrueZhuanjia committed 2025-06-10 23:42:23 +08:00
1 parent 5fd8a7c587
commit 78be18ed89
5 files changed
+36 -24

No files matched your search

+1 -1
View File
@@ -1402,7 +1402,7 @@ ICAgICAgICAgICAgICA
<image name="arrow.left.square.fill" catalog="system" width="128" height="114"/>
<image name="arrow.uturn.backward" width="19.06089973449707" height="18.594499588012695"/>
<image name="plus.rectangle.fill.on.rectangle.fill" catalog="system" width="128" height="102"/>
<image name="rectangle.and.pencil.and.ellipsis" width="34.681900024414062" height="24.316600799560547"/>
<image name="rectangle.and.pencil.and.ellipsis" width="36.005599975585938" height="24.95680046081543"/>
<image name="square.and.arrow.down.fill" catalog="system" width="121" height="128"/>
<image name="trash.fill" catalog="system" width="117" height="128"/>
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
+1 -2
View File
@@ -458,12 +458,11 @@ import UIKit
CommandManager.mouseButtonMappings.keys.map { $0 as String },
CommandManager.touchPadCmds.map { $0 as String }
]
.lazy // 零内存开销
.lazy
.flatMap { $0 } // 三维展开
.map(String.init(describing:)) // 安全类型转换
let keys = combinedStrings.joined(separator: "|")
print(keys)
let pattern = "^(?:\(keys))(?:-(?:\(keys)))*(?:-\\d+MS)?$"
@@ -104,11 +104,19 @@
horizontalGuideline = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self._view.frame.size.width * 2, 2)];
horizontalGuideline.backgroundColor = [UIColor blueColor];
horizontalGuideline.hidden = YES;
horizontalGuideline.layer.shadowColor = [UIColor blackColor].CGColor;
horizontalGuideline.layer.shadowOffset = CGSizeMake(0, 0);
horizontalGuideline.layer.shadowOpacity = 0.5;
horizontalGuideline.layer.shadowRadius = 2;
[self._view addSubview: horizontalGuideline];
verticalGuideline = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 2, self._view.frame.size.height * 2)];
verticalGuideline.backgroundColor = [UIColor blueColor];
verticalGuideline.hidden = YES;
verticalGuideline.layer.shadowColor = [UIColor blackColor].CGColor;
verticalGuideline.layer.shadowOffset = CGSizeMake(0, 0);
verticalGuideline.layer.shadowOpacity = 0.5;
verticalGuideline.layer.shadowRadius = 2;
[self._view addSubview: verticalGuideline];
}
@@ -142,8 +142,8 @@
/* Add tap gesture to toolbar's chevron to allow user to tap it in order to move the toolbar on and off screen */
UITapGestureRecognizer *singleFingerTap =
[[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(moveToolbar:)];
[[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(moveToolbar:)];
[self.chevronView addGestureRecognizer:singleFingerTap];
self.layoutOSC = [[LayoutOnScreenControls alloc] initWithView:self.view controllerSup:nil streamConfig:nil oscLevel:OSCSegmentSelected];
@@ -157,10 +157,10 @@
NSMutableArray* allProfiles = [profilesManager getAllProfiles];
/*
if ([allProfiles count] == 0) { // if no saved OSC profiles exist yet then create one called 'Default' and associate it with Moonlight's legacy 'Full' OSC layout that's already been laid out on the screen at this point
[profilesManager saveProfileWithName:@"Default" andButtonLayers:self.layoutOSC.OSCButtonLayers];
[profilesManager importDefaultTemplates];
}*/
if ([allProfiles count] == 0) { // if no saved OSC profiles exist yet then create one called 'Default' and associate it with Moonlight's legacy 'Full' OSC layout that's already been laid out on the screen at this point
[profilesManager saveProfileWithName:@"Default" andButtonLayers:self.layoutOSC.OSCButtonLayers];
[profilesManager importDefaultTemplates];
}*/
if (![profilesManager profileName:DEFAULT_TEMPLATE_NAME alreadyExistIn:allProfiles]){
[profilesManager importDefaultTemplates];
}
@@ -200,30 +200,33 @@
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:0.3
delay:0.25
usingSpringWithDamping:0.8
initialSpringVelocity:0.5
options:UIViewAnimationOptionCurveEaseInOut animations:^{ // Animate toolbar up a a very small distance. Note the 0.35 time delay is necessary to avoid a bug that keeps animations from playing if the animation is presented immediately on a modally presented VC
delay:0.25
usingSpringWithDamping:0.8
initialSpringVelocity:0.5
options:UIViewAnimationOptionCurveEaseInOut animations:^{ // Animate toolbar up a a very small distance. Note the 0.35 time delay is necessary to avoid a bug that keeps animations from playing if the animation is presented immediately on a modally presented VC
self.toolbarRootView.frame = CGRectMake(self.toolbarRootView.frame.origin.x, self.toolbarRootView.frame.origin.y - 25, self.toolbarRootView.frame.size.width, self.toolbarRootView.frame.size.height);
}
completion:^(BOOL finished) {
}
completion:^(BOOL finished) {
[UIView animateWithDuration:0.3
delay:0
usingSpringWithDamping:0.7
initialSpringVelocity:1.0
options:UIViewAnimationOptionCurveEaseIn animations:^{ // Animate the toolbar back down that same distance
delay:0
usingSpringWithDamping:0.7
initialSpringVelocity:1.0
options:UIViewAnimationOptionCurveEaseIn animations:^{ // Animate the toolbar back down that same distance
self.toolbarRootView.frame = CGRectMake(self.toolbarRootView.frame.origin.x, self.toolbarRootView.frame.origin.y + 25, self.toolbarRootView.frame.size.width, self.toolbarRootView.frame.size.height);
}
completion:^(BOOL finished) {
}
completion:^(BOOL finished) {
NSLog (@"done");
}];
}];
});
trashCanStoryBoardColor = trashCanButton.tintColor;
self.toolbarRootView.layer.shadowColor = [UIColor blackColor].CGColor;
self.toolbarRootView.layer.shadowOffset = CGSizeMake(0, 0);
self.toolbarRootView.layer.shadowOpacity = 0.5;
self.toolbarRootView.layer.shadowRadius = 7;
}
- (void) viewDidAppear:(BOOL)animated {
OnScreenWidgetView.editMode = true;
selectedWidgetView = nil;
@@ -83,8 +83,9 @@ const double NAV_BAR_HEIGHT = 50;
[self.tableView registerNib:[UINib nibWithNibName:@"ProfileTableViewCell" bundle:nil]
forCellReuseIdentifier:@"Cell"]; // Register the custom cell nib file with the table view
self.tableView.alpha = 0.5;
self.tableView.backgroundColor = [[UIColor colorWithRed:0.5 green:0.7 blue:1.0 alpha:1.0] colorWithAlphaComponent:0.2]; // set background color & transparency
self.tableView.alpha = 0.7;
//self.tableView.backgroundColor = [[UIColor colorWithRed:0.5 green:0.7 blue:1.0 alpha:1.0] colorWithAlphaComponent:0.2]; // set background color & transparency
self.tableView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1]; // set background color & transparency
// self.tableView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2]; // set background color & transparency
}
@@ -311,6 +312,7 @@ didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
cell.name.backgroundColor = [UIColor clearColor];
cell.name.alpha = 1.0;
cell.name.textColor = [UIColor whiteColor]; // Opaque white text
cell.name.font =[UIFont systemFontOfSize:20 weight:UIFontWeightMedium];
cell.name.shadowColor = [UIColor blackColor]; // Black shadow
// Set the shadow offset
cell.name.shadowOffset = CGSizeMake(1.0, 1.5);