Appearance/placing of ports on activity diagram is unusual
### Describe the bug
When placing an input/output pin or proxy port on an activity or block diagram, the pin does not automatically attach to a nearby action or block, and it doesn't appear as a pin. The pin can be dragged onto an activity and seems to function as expected, but the appearance looks strange. 

### To Reproduce
Steps to reproduce the behavior:
1. Add an action to an activity diagram and place an input/output pin
2. Attempt to attach the pin to the action
3. Same steps for adding a block and proxy pin to a block diagram

### Expected behavior
The pin to appear as expected (small square on the outside of the action). Notably, the pin behaviour seems to be correct on the coffee machine example model, but it is only on my own model that the pins behave this way.

### Screenshots
Straight after adding the pin to the activity diagram:
![image](https://github.com/gaphor/gaphor/assets/136543386/3535b232-fe53-4a6d-9d1c-86b6751f2ae7)
After adding the pin to the action and connecting an object flow arrow:
![image](https://github.com/gaphor/gaphor/assets/136543386/63b3951c-5762-4fcc-964f-3cc4d34b1836)


### OS
- [ ] Linux (Please put in notes the specific distro)
- [ ] macOS
- [x ] Windows

### Version
Version of Gaphor: 2.19.1

### Additional information
Add any other context about the problem here.

diff --git a/gaphor/diagram/shapes.py b/gaphor/diagram/shapes.py
index 9e3e3d243..66f3d6e0f 100644
--- a/gaphor/diagram/shapes.py
+++ b/gaphor/diagram/shapes.py
@@ -52,21 +52,21 @@ def stroke(context: DrawContext, fill=True, dash=True):
 
 def draw_border(box, context: DrawContext, bounding_box: Rectangle):
     cr = context.cairo
-    d = context.style.get("border-radius", 0)
     x, y, width, height = bounding_box
+    d = min(context.style.get("border-radius", 0), width / 2.0, height / 2.0)
 
-    cr.move_to(x, d)
+    cr.move_to(x, y + d)
     cr.set_dash(context.style.get("dash-style", ()), 0)
     if d:
-        x1 = width + x
-        y1 = height + y
-        cr.arc(d, d, d, pi, 1.5 * pi)
+        x1 = x + width
+        y1 = y + height
+        cr.arc(x + d, y + d, d, pi, 1.5 * pi)
         cr.line_to(x1 - d, y)
-        cr.arc(x1 - d, d, d, 1.5 * pi, y)
+        cr.arc(x1 - d, y + d, d, 1.5 * pi, 0)
         cr.line_to(x1, y1 - d)
         cr.arc(x1 - d, y1 - d, d, 0, 0.5 * pi)
-        cr.line_to(d, y1)
-        cr.arc(d, y1 - d, d, 0.5 * pi, pi)
+        cr.line_to(x + d, y1)
+        cr.arc(x + d, y1 - d, d, 0.5 * pi, pi)
     else:
         cr.rectangle(x, y, width, height)
 
diff --git a/gaphor/ui/filedialog.py b/gaphor/ui/filedialog.py
index 062bc6055..a2f961a72 100644
--- a/gaphor/ui/filedialog.py
+++ b/gaphor/ui/filedialog.py
@@ -93,7 +93,7 @@ def save_file_dialog(
                 dialog.destroy()
                 handler(filename)
             else:
-                dialog.set_visible(True)
+                dialog.show()
         else:
             dialog.destroy()
 
['gaphor/diagram/shapes.py', 'gaphor/ui/filedialog.py']