more preparations for new widget template

This commit is contained in:
True Zhuanjia
2026-05-28 14:21:02 +08:00
parent 3aa7a90a2f
commit af1f0e75c7
5 changed files with 78 additions and 3 deletions
+3 -3
View File
@@ -3854,9 +3854,9 @@ import ObjectiveC.runtime
}
}
if folder.buttonMode == .slideAndHold, folder.isOnlyRootFolder(), folder.revealMode == .coexist {
for otherUnfoldedFolder in OnScreenWidgetView.mapping.values.filter({$0.isFolder && !$0.folded && $0 != folder}) {
OnScreenWidgetView.setCollection(hidden: !folded, for: otherUnfoldedFolder)
if folder.buttonMode == .slideAndHold, folder.parentSequence == -1, folder.revealMode == .coexist {
for unfoldedSubfolder in OnScreenWidgetView.mapping.values.filter({$0.isFolder && !$0.folded && $0 != folder && OnScreenWidgetView.getParentFolders(of: $0).contains(folder)}) {
OnScreenWidgetView.setCollection(hidden: !folded, for: unfoldedSubfolder)
}
}
}
+1
View File
@@ -759,6 +759,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
widgetView.walkKeyActionType = buttonState.walkKeyActionType;
widgetView.walkKeyThreshold = buttonState.walkKeyThreshold;
widgetView.hidden = !OnScreenWidgetView.enableFolderAnimation && widgetView.parentSequence != -1;
// Add the widgetView to the view controller's view
[self->_streamFrameTopLayerView addSubview:widgetView]; // add keyboard button to the stream frame view. must add it to the target view before setting location.
buttonState.position = [self denormalizeWidgetPosition:buttonState.position];
@@ -1069,6 +1069,35 @@
}
}
},
"=dummyPad" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Dummy pad"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "触控挡板"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸控擋板"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸控擋板"
}
}
}
},
"=edit" : {
"extractionState" : "manual",
"localizations" : {
@@ -6356,6 +6385,35 @@
}
}
},
"dummyPadTip" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "A dummy touchpad that does nothing"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "一块啥都不干的挡板区域"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "一塊啥都不幹的擋板區域"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "一塊啥都不幹的擋板區域"
}
}
}
},
"e.g. ctrl, lswheel, wasdpad..." : {
"extractionState" : "manual",
"localizations" : {
@@ -787,6 +787,12 @@ static NSMutableSet* hostList;
}
- (void) prepareToStreamApp:(TemporaryApp *)app {
self.navigationController.navigationBar.hidden = true;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.navigationController.navigationBar.hidden = false;
});
launchedApp = app;
[self updateResolutionAccordingly];
self.revealViewController.isStreaming = true; // tell the revealViewController streaming is started.
+10
View File
@@ -764,6 +764,16 @@ struct WidgetPickerView: View {
allowsShortcutCombo: false,
forcedComboMode: .skill
),
FunctionalButtonOption(
localizationKey: "=dummyPad",
cmd: "DUMMYPAD",
tip: LocalizationHelper.localizedString(forKey: "dummyPadTip"),
allowsKeyboardCombination: false,
allowsGamepadCombination: false,
allowsSkillCombo: false,
allowsShortcutCombo: false,
forcedComboMode: .skill
),
]
private let shortcutLibraryOptions: [FunctionalButtonOption] = [