Skip to content

Commit

Permalink
Better tag alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
YamiDaisuke committed Dec 31, 2020
1 parent 19ad483 commit 1dafa7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion TodoAll/UI/TagCloud.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct TagCloud: View {

var body: some View {
VStack {
SingleAxisGeometryReader() { width in
SingleAxisGeometryReader(alignment: .topLeading) { width in
generateContent(withWidth: width)
}
if isEditing {
Expand Down Expand Up @@ -112,5 +112,10 @@ struct TagCloud_Previews: PreviewProvider {
tags: .constant(["Tag1", "Tag 2", "Taaaaaaag3", "Tag4", "Tag5", "Tag6", "Tag7", "Tag8", "Some long tag"]),
isEditing: false
)

TagCloud(
tags: .constant(["Tag1"]),
isEditing: false
)
}
}
2 changes: 1 addition & 1 deletion TodoAll/View/CreateTaskView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct CreateTaskView: View {
DatePicker("Due Date", selection: self.$viewModel.dueDate)
.padding()

ZStack(alignment: Alignment(horizontal: .leading, vertical: .top)) {
ZStack(alignment: .topLeading) {
TextEditor(text: $viewModel.taskDescription)
.background(Color.clear)
.padding()
Expand Down

0 comments on commit 1dafa7f

Please sign in to comment.