             }
         }
         
-        var arrowTipXOrigin: CGFloat
-        
         switch position {
         case .bottom, .top, .any:
+            var arrowTipXOrigin: CGFloat
             if frame.width < refViewFrame.width {
                 arrowTipXOrigin = tipViewSize.width / 2
             } else {
                 arrowTipXOrigin = abs(frame.x - refViewFrame.x) + refViewFrame.width / 2
             }
             
-            arrowTip = CGPoint(x: arrowTipXOrigin, y: position == .bottom ? tipViewSize.height - preferences.positioning.bubbleVInset :  preferences.positioning.bubbleVInset)
+            arrowTip = CGPoint(x: arrowTipXOrigin, y: position == .bottom ? tipViewSize.height - preferences.positioning.bubbleInsets.bottom :  preferences.positioning.bubbleInsets.top)
         case .right, .left:
+            var arrowTipYOrigin: CGFloat
             if frame.height < refViewFrame.height {
-                arrowTipXOrigin = tipViewSize.height / 2
+                arrowTipYOrigin = tipViewSize.height / 2
             } else {
-                arrowTipXOrigin = abs(frame.y - refViewFrame.y) + refViewFrame.height / 2
+                arrowTipYOrigin = abs(frame.y - refViewFrame.y) + refViewFrame.height / 2
             }
             
-            arrowTip = CGPoint(x: preferences.drawing.arrowPosition == .left ? preferences.positioning.bubbleVInset : tipViewSize.width - preferences.positioning.bubbleVInset, y: arrowTipXOrigin)
+            arrowTip = CGPoint(x: preferences.drawing.arrowPosition == .left ? preferences.positioning.bubbleInsets.left : tipViewSize.width - preferences.positioning.bubbleInsets.right, y: arrowTipYOrigin)
         }
         
         if case .view(let contentView) = content {

        }
        
        public struct Positioning {
            public var bubbleHInset         = CGFloat(1)
            public var bubbleVInset         = CGFloat(1)
            public var contentHInset        = CGFloat(10)
            public var contentVInset        = CGFloat(10)
            public var maxWidth             = CGFloat(200)
        }
        

        
        [unowned self] in
        
        let contentHInset = self.preferences.positioning.contentInsets.left + self.preferences.positioning.contentInsets.right
        let contentVInset = self.preferences.positioning.contentInsets.top + self.preferences.positioning.contentInsets.bottom
        let bubbleHInset = self.preferences.positioning.bubbleInsets.left + self.preferences.positioning.bubbleInsets.right
        let bubbleVInset = self.preferences.positioning.bubbleInsets.top + self.preferences.positioning.bubbleInsets.bottom

        var tipViewSize = CGSize(width: self.contentSize.width + contentHInset + bubbleHInset, height: self.contentSize.height + contentVInset + bubbleVInset + self.preferences.drawing.arrowHeight)
        
        return tipViewSize
    }()
