Skip to content

Commit

Permalink
Added explicit Quit button
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexStepanischev committed Nov 5, 2022
1 parent ab1aac7 commit f5e81d6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WeatherDock.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"WeatherDock/Preview Content\"";
DEVELOPMENT_TEAM = CT76ZJ5MHM;
Expand Down Expand Up @@ -546,7 +546,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"WeatherDock/Preview Content\"";
DEVELOPMENT_TEAM = CT76ZJ5MHM;
Expand Down
15 changes: 15 additions & 0 deletions WeatherDock/views/main/HeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ struct HeaderView: View {
}
.buttonStyle(PlainButtonStyle())
.padding(.trailing)
Menu{
Button {
NSApplication.shared.terminate(self)
} label: {
Text("Quit")
}
.buttonStyle(PlainButtonStyle())
} label: {
Image(systemName: "xmark")
}
.frame(width: 10)
.menuStyle(.borderlessButton)
.menuIndicator(.hidden)
.padding(.trailing)

}.padding(.top)
}
}

0 comments on commit f5e81d6

Please sign in to comment.