Skip to content

Commit 795c1a1

Browse files
committed
Components alignment.
1 parent da83fdf commit 795c1a1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Diffusion/Views/TextToImage.swift

+9-7
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@ struct ImageWithPlaceholder: View {
9292
VStack {
9393
imageView.resizable().clipShape(RoundedRectangle(cornerRadius: 20))
9494
HStack {
95-
if let interval = interval {
96-
Text(String(format:"Time: %.1fs", interval))
97-
}
98-
Spacer()
99-
ShareButtons(image: theImage, name: lastPrompt)
100-
Spacer()
101-
}
95+
let intervalString = String(format: "Time: %.1fs", interval ?? 0)
96+
Rectangle().fill(.clear).overlay(Text(intervalString).frame(maxWidth: .infinity, alignment: .leading).padding(.leading))
97+
Rectangle().fill(.clear).overlay(
98+
HStack {
99+
Spacer()
100+
ShareButtons(image: theImage, name: lastPrompt).padding(.trailing)
101+
}
102+
)
103+
}.frame(maxHeight: 25)
102104
})
103105
}
104106
}

0 commit comments

Comments
 (0)