ok FINALLY fixed the git issue with build but yes added some text margin control to teleprompter
This commit is contained in:
parent
904eea5c2a
commit
16bfb8d6ba
@ -12,22 +12,17 @@ struct TeleprompterView: View {
|
|||||||
let project: OCProject
|
let project: OCProject
|
||||||
|
|
||||||
@State private var textSize = 45.0
|
@State private var textSize = 45.0
|
||||||
|
@State private var horizPadding = 15.0
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
Text(project.script)
|
Text(project.script)
|
||||||
.font(.system(size: textSize))
|
.font(.system(size: textSize))
|
||||||
.padding(.horizontal)
|
.padding(.horizontal, horizPadding)
|
||||||
}
|
}
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .topBarTrailing) {
|
ToolbarItem(placement: .topBarTrailing) {
|
||||||
Menu {
|
Menu { overflowMenu } label: {
|
||||||
Menu {
|
|
||||||
Slider(value: $textSize, in: 12...150, step: 1)
|
|
||||||
} label: {
|
|
||||||
Image(systemName: "textformat.size")
|
|
||||||
}
|
|
||||||
} label: {
|
|
||||||
Image(systemName: "ellipsis.circle")
|
Image(systemName: "ellipsis.circle")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,6 +35,17 @@ struct TeleprompterView: View {
|
|||||||
}
|
}
|
||||||
.persistentSystemOverlays(.hidden)
|
.persistentSystemOverlays(.hidden)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var overflowMenu: some View {
|
||||||
|
VStack {
|
||||||
|
Menu { Stepper("\(textSize.formatted())", value: $textSize, in: 12...150) } label: {
|
||||||
|
Label("Text Size", systemImage: "textformat.size")
|
||||||
|
}
|
||||||
|
Menu { Stepper("\(horizPadding.formatted())", value: $horizPadding, in: 0...150, step: 5) } label: {
|
||||||
|
Label("Margin", systemImage: "rectangle.portrait.arrowtriangle.2.inward")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user