Skip to content

Commit

Permalink
Merge pull request #3 from cameronshemilt/improve-tap-area
Browse files Browse the repository at this point in the history
Improved button tap-area
  • Loading branch information
cameronshemilt authored Mar 23, 2021
2 parents 9dd1d64 + afaf0c6 commit 0fa1ea9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Sources/KeyboardToolbar/KeyboardToolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ internal struct KeyboardToolbar: View {
(item.image ?? Image(systemName: "placeholdertext.fill"))
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: style.itemSize, height: style.itemSize)
.foregroundColor(item.color)
.frame(height: style.itemSize)
.frame(minWidth: max(style.itemSize, style.height))
.frame(height: style.height)
} else {
Text(item.text ?? "")
.font(.system(size: style.itemSize))
.frame(minWidth: style.itemSize)
.foregroundColor(item.color)
.frame(height: style.itemSize)
.frame(minWidth: max(style.itemSize, style.height))
.frame(height: style.height)
}
})
.frame(height: style.height)
.contentShape(Rectangle())
}
}
Expand Down

0 comments on commit 0fa1ea9

Please sign in to comment.