Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 7, 2021
1 parent 701e154 commit 199c3b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Example/KeyboardShortcutsExample/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private struct DynamicShortcutRecorder: View {
@Binding var isPressed: Bool

var body: some View {
HStack {
HStack(alignment: .firstTextBaseline) {
KeyboardShortcuts.Recorder(for: name)
.padding(.trailing, 10)
Text("Pressed? \(isPressed ? "👍" : "👎")")
Expand Down Expand Up @@ -91,13 +91,13 @@ private struct DoubleShortcut: View {

var body: some View {
VStack {
HStack {
HStack(alignment: .firstTextBaseline) {
KeyboardShortcuts.Recorder(for: .testShortcut1)
.padding(.trailing, 10)
Text("Pressed? \(isPressed1 ? "👍" : "👎")")
.frame(width: 100, alignment: .leading)
}
HStack {
HStack(alignment: .firstTextBaseline) {
KeyboardShortcuts.Recorder(for: .testShortcut2)
.padding(.trailing, 10)
Text("Pressed? \(isPressed2 ? "👍" : "👎")")
Expand Down
2 changes: 1 addition & 1 deletion Sources/KeyboardShortcuts/Recorder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension KeyboardShortcuts {

struct PreferencesView: View {
var body: some View {
HStack {
HStack(alignment: .firstTextBaseline) {
Text("Toggle Unicorn Mode:")
KeyboardShortcuts.Recorder(for: .toggleUnicornMode)
}
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import KeyboardShortcuts

struct PreferencesView: View {
var body: some View {
HStack {
HStack(alignment: .firstTextBaseline) {
Text("Toggle Unicorn Mode:")
KeyboardShortcuts.Recorder(for: .toggleUnicornMode)
}
Expand Down

0 comments on commit 199c3b2

Please sign in to comment.