folder behavior minor fixes
This commit is contained in:
@@ -3180,7 +3180,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" alpha="0.76999998092651367" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" apportionsSegmentWidthsByContent="YES" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="cKS-fy-Zpg">
|
||||
<rect key="frame" x="130" y="0.0" width="420" height="32"/>
|
||||
<rect key="frame" x="130" y="0.0" width="470" height="32"/>
|
||||
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<segments>
|
||||
<segment title="slide-toggle"/>
|
||||
@@ -3193,9 +3193,9 @@
|
||||
<color key="selectedSegmentTintColor" red="0.23087820410000001" green="0.4576539993" blue="0.51765710119999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
</segmentedControl>
|
||||
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dOF-FW-cBU" userLabel="uiLabel">
|
||||
<rect key="frame" x="550" y="0.0" width="100" height="31"/>
|
||||
<rect key="frame" x="600" y="0.0" width="50" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="hfV-um-PjK"/>
|
||||
<constraint firstAttribute="width" constant="50" id="hfV-um-PjK"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
for(UIView* view in self.layoutToolVC.view.subviews){
|
||||
if ([view isKindOfClass:[OnScreenWidgetView class]] && view != widget) {
|
||||
OnScreenWidgetView* otherWidget = (OnScreenWidgetView *) view;
|
||||
if(widget.isHidden) continue;
|
||||
if(widget.isFolder && widget.bulkMoveEnabled && [widget.sequenceSet containsObject:@(otherWidget.sequence)]) break;
|
||||
if((horizontalGuideline.center.y < view.center.y + 2) && (horizontalGuideline.center.y > view.center.y - 2)) {
|
||||
horizontalGuideline.backgroundColor = [UIColor yellowColor];
|
||||
@@ -178,6 +179,7 @@
|
||||
}
|
||||
for(UIView* view in self.layoutToolVC.view.subviews){
|
||||
if ([view isKindOfClass:[OnScreenWidgetView class]] && view != widget) {
|
||||
if(view.isHidden) continue;
|
||||
if ((verticalGuideline.center.x < view.center.x + 2) && (verticalGuideline.center.x > view.center.x - 2)) {
|
||||
verticalGuideline.backgroundColor = [UIColor yellowColor];
|
||||
OnScreenWidgetView.isVerticallyAligned = true;
|
||||
|
||||
@@ -3212,6 +3212,12 @@ import ObjectiveC.runtime
|
||||
if center != layoutChanges.last {
|
||||
layoutChanges.append(center)
|
||||
}
|
||||
if self.isFolder, self.bulkMoveEnabled {
|
||||
for sequence in self.sequenceSet {
|
||||
guard let widget = OnScreenWidgetView.mapping[sequence] else {continue}
|
||||
widget.layoutChanges.append(widget.storedCenter)
|
||||
}
|
||||
}
|
||||
|
||||
if OnScreenWidgetView.capturer != nil {
|
||||
if firstTouchMoved {undoRelocation()}
|
||||
@@ -3719,7 +3725,6 @@ import ObjectiveC.runtime
|
||||
if !widget.isHidden {
|
||||
widget.center = CGPoint(x: widget.center.x+vector.dx, y: widget.center.y+vector.dy)
|
||||
}
|
||||
widget.layoutChanges.append(widget.storedCenter)
|
||||
widget.relocatedDuringStreaming = true
|
||||
}
|
||||
}
|
||||
@@ -3811,6 +3816,7 @@ import ObjectiveC.runtime
|
||||
|
||||
@objc static func set(folded:Bool, for folder:OnScreenWidgetView) { // folder综合逻辑
|
||||
guard folder.isFolder else {return}
|
||||
OnScreenWidgetView.profileChangedDuringStreaming = true
|
||||
setCollection(folded: folded, for: folder)
|
||||
|
||||
if !folded, folder.revealMode == .exclusive {
|
||||
@@ -3849,11 +3855,13 @@ import ObjectiveC.runtime
|
||||
else {
|
||||
OnScreenWidgetView.postExclusiveUnfoldedSequences.insert(folder.sequence)
|
||||
for unfoldedExclusiveFolder in OnScreenWidgetView.mapping.values.filter({$0.isFolder
|
||||
&& folder.parentSequence != -1
|
||||
&& !$0.folded
|
||||
&& $0 != folder
|
||||
&& $0.revealMode == .exclusive
|
||||
&& !OnScreenWidgetView.getParentFolders(of: $0).contains(folder)}) {
|
||||
OnScreenWidgetView.setCollection(folded: true, for: unfoldedExclusiveFolder)
|
||||
&& !OnScreenWidgetView.getParentFolders(of: folder).contains($0)
|
||||
}) {
|
||||
OnScreenWidgetView.setCollection(folded: true, for: unfoldedExclusiveFolder, recursive: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3928,6 +3936,12 @@ import ObjectiveC.runtime
|
||||
widget.parentSequence = folder.sequence
|
||||
folder.sequenceSet.insert(widget.sequence)
|
||||
widget.isHidden = folder.folded
|
||||
if widget.isFolder, widget.bulkMoveEnabled {
|
||||
for sequence in widget.sequenceSet {
|
||||
guard let subWidget = OnScreenWidgetView.mapping[sequence] else {continue}
|
||||
subWidget.undoRelocation()
|
||||
}
|
||||
}
|
||||
/*
|
||||
if folder.buttonMode == .slideAndHold, widget.isFunctionalButton {
|
||||
widget.buttonMode = .slideToToggle
|
||||
@@ -4105,7 +4119,7 @@ import ObjectiveC.runtime
|
||||
var horizontallyAligned = false
|
||||
var verticallyAligned = false
|
||||
widget.forEachWidget{ otherWidget in
|
||||
guard otherWidget != widget else {return}
|
||||
guard otherWidget != widget, otherWidget.isHidden == false else {return}
|
||||
|
||||
if widget.isFolder, widget.bulkMoveEnabled, widget.sequenceSet.contains(otherWidget.sequence) {return}
|
||||
verticallyAligned = verticallyAligned ? verticallyAligned : widget.center.x > otherWidget.center.x-2 && widget.center.x < otherWidget.center.x+2
|
||||
|
||||
@@ -698,7 +698,6 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
OnScreenWidgetView.buttonVisualFeedbackEnabled = self->settings.buttonVisualFeedback;
|
||||
OnScreenWidgetView.gamepadOverlayFLag = profile.gamepadOverlayEnabled;
|
||||
OnScreenWidgetView.profileChangedDuringStreaming = false;
|
||||
|
||||
bool hasLegacyWidget = false;
|
||||
if(reloadWidgets && !OnScreenWidgetView.editMode){
|
||||
@@ -831,6 +830,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
[self.streamFrameVC restorePersistedStreamViewOffsetAndScaleWithProfile:profile];
|
||||
[self updateTouchHandlerWithProfile:profile];
|
||||
OnScreenWidgetView.profileChangedDuringStreaming = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -750,6 +750,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"=bumperRadial" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Radial"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "肩键轮盘"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "肩鍵輪盤"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "肩鍵輪盤"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"=closeTab" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
|
||||
Reference in New Issue
Block a user