Skip to content

Commit

Permalink
feat: integrate toggle line number
Browse files Browse the repository at this point in the history
  • Loading branch information
Build Pipeline committed Nov 14, 2022
1 parent 99ae62d commit 752bb91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions PlantUML/PlantUMLContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ struct PlantUMLContentView: View {
@State private var isPreviewVisible = true
@State private var isScaleToFit = true
@State private var fontSize = CGFloat(12)

@State var showLine:Bool = false


var body: some View {
GeometryReader { geometry in
HStack {
if( isEditorVisible ) {
PlantUMLLineEditorView( items: $diagram.items,
fontSize: $fontSize )
fontSize: $fontSize,
showLine: $showLine)

}
Divider().background(Color.blue).padding()
Expand All @@ -56,6 +59,7 @@ struct PlantUMLContentView: View {
EditButton()
SaveButton()
fontSizeView()
toggleLineNumberView()
}
ToolbarItemGroup(placement: .navigationBarTrailing) {
ScaleToFitButton()
Expand All @@ -69,6 +73,13 @@ struct PlantUMLContentView: View {
}
}

func toggleLineNumberView() -> some View {
Button( action: { showLine.toggle() } ) {
Image( systemName: "list.number")
}

}

func fontSizeView() -> some View {
HStack( spacing: 0 ) {
Button( action: { fontSize += 1 } ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"location" : "https://github.com/bsorrentino/PlantUML4iPad.git",
"state" : {
"branch" : "line_editor",
"revision" : "604b8d5da6e8672e25e55848c67c6724810321a2"
"revision" : "6f6ddb7113c4f82d7ae8faed40342e6fee770f71"
}
}
],
Expand Down

0 comments on commit 752bb91

Please sign in to comment.