diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index 87952c6f..38161179 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -1707,7 +1707,10 @@ import SVGKit let touch = touches.first // get touchBeganLocation - if OnScreenWidgetView.editMode {self.touchBeganLocation = touch!.location(in: superview)} + if OnScreenWidgetView.editMode { + self.touchBeganLocation = touch!.location(in: superview) + self.highlightBorder(highlighted: true) + } else { if widgetType == WidgetTypeEnum.button, self.buttonMode == ButtonMode.movable.rawValue {self.touchBeganLocation = touch!.location(in: superview)} else {self.touchBeganLocation = touch!.location(in: self)} @@ -2465,6 +2468,8 @@ import SVGKit // Trigger layout update superview.layoutIfNeeded() + self.highlightBorder(highlighted: false) + setupView(); //re-setup widgetView style if self.widgetType == WidgetTypeEnum.touchPad{ @@ -2551,6 +2556,17 @@ import SVGKit } } + private func highlightBorder(highlighted:Bool) { + if highlighted { + self.layer.borderWidth = 2 + self.layer.borderColor = voidlinkPurple + } + else { + self.layer.borderWidth = self.borderWidth + self.layer.borderColor = self.defaultBorderColor + } + } + override func didMoveToSuperview() { super.didMoveToSuperview() if superview == nil {