Skip to content

Commit 8c649af

Browse files
committed
Fix drawing for macOS 13
1 parent cbd1a86 commit 8c649af

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

OpenTimelineIO-Sample/OpenTimelineIO-Reader/Views/ItemView.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,21 @@ struct ItemView : View {
2626
if let _ = item as? Gap
2727
{
2828
RoundedRectangle(cornerRadius: 3)
29-
.strokeBorder( self.selected ? .white : .clear, lineWidth: 1)
30-
.foregroundStyle( Color("GapTrackBaseColor") )
29+
.fill(Color("GapTrackBaseColor")) // Fill the RoundedRectangle with color
30+
.overlay(
31+
RoundedRectangle(cornerRadius: 3)
32+
.stroke(self.selected ? .white : .clear, lineWidth: 1) // Add stroke/outline
33+
)
3134
.frame(width: self.getSafeWidth() - 2)
3235
}
3336
else
3437
{
3538
RoundedRectangle(cornerRadius: 3)
36-
.strokeBorder( self.selected ? .white : .clear, lineWidth: 1)
37-
.foregroundStyle( self.backgroundColor.gradient )
39+
.fill(self.backgroundColor.gradient) // Fill the RoundedRectangle with color
40+
.overlay(
41+
RoundedRectangle(cornerRadius: 3)
42+
.stroke(self.selected ? .white : .clear, lineWidth: 1) // Add stroke/outline
43+
)
3844
.frame(width: self.getSafeWidth() - 2)
3945

4046
Text(item.name)

0 commit comments

Comments
 (0)