widget layout tool minor fixes
This commit is contained in:
1 parent
3ec53c29d4
commit
a4951309d3
2 files changed
+19
-1
No files matched your search
@@ -1307,6 +1307,12 @@ import UIKit
|
||||
let currentLocation: CGPoint
|
||||
if OnScreenWidgetView.editMode {currentLocation = touch.location(in: superview)}
|
||||
else {currentLocation = touch.location(in: self)}
|
||||
|
||||
if !firstTouchMoved {
|
||||
// First move event
|
||||
self.latestTouchLocation = currentLocation
|
||||
self.firstTouchMoved = true
|
||||
}
|
||||
|
||||
let offsetX = currentLocation.x - latestTouchLocation.x;
|
||||
let offsetY = currentLocation.y - latestTouchLocation.y;
|
||||
|
||||
+13
-1
@@ -579,6 +579,7 @@
|
||||
[widgetInitParams setObject: alertController.textFields[1].text forKey:@"buttonLabel"];
|
||||
[widgetInitParams setObject: alertController.textFields[2].text forKey:@"minStickOffsetString"];
|
||||
[widgetInitParams setObject: alertController.textFields[3].text forKey:@"shape"];
|
||||
[self removeStickIndicators];
|
||||
[self updateWidget:self->selectedWidgetView byParams:widgetInitParams createNew:false];
|
||||
}];
|
||||
|
||||
@@ -725,6 +726,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)removeStickIndicators{
|
||||
for(UIView* view in self.view.subviews){
|
||||
if([view isKindOfClass:[OnScreenWidgetView class]]){
|
||||
OnScreenWidgetView* widget = (OnScreenWidgetView* )view;
|
||||
[widget.crossMarkLayer removeFromSuperlayer];
|
||||
[widget.stickBallLayer removeFromSuperlayer];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
- (CGFloat)denormalizeSizeFactor:(CGFloat)sizeFactor{
|
||||
bool isNormalizedSizeFactor = sizeFactor > 6;
|
||||
@@ -1390,7 +1402,7 @@
|
||||
if(!isToolbarHidden && self->selectedWidgetView != nil && [self layerIsOverlappingWithTrashcanButton:selectedWidgetView.layer]){
|
||||
[self->selectedWidgetView removeFromSuperview];
|
||||
[self.onScreenWidgetViews removeObject:self->selectedWidgetView];
|
||||
[self hideStickIndicators];
|
||||
[self removeStickIndicators];
|
||||
[selectedWidgetView.buttonDownVisualEffectLayer removeFromSuperlayer];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user