Skip to content

Commit

Permalink
config: open icon picker when clicking icon as well
Browse files Browse the repository at this point in the history
Fixes #6316
  • Loading branch information
osy committed May 23, 2024
1 parent 6a67237 commit da2a58b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Platform/Shared/VMConfigInfoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ struct VMConfigInfoView: View {
#if os(macOS)
VStack {
IconPreview(url: config.iconURL)
.onTapGesture {
imageSelectVisible.toggle()
}
Button(action: { imageSelectVisible.toggle() }, label: {
Text("Choose")
}).fileImporter(isPresented: $imageSelectVisible, allowedContentTypes: [.image]) { result in
Expand All @@ -148,6 +151,9 @@ struct VMConfigInfoView: View {
#if os(macOS)
VStack {
IconPreview(url: config.iconURL)
.onTapGesture {
imageSelectVisible.toggle()
}
Button(action: { imageSelectVisible.toggle() }, label: {
Text("Choose")
}).popover(isPresented: $imageSelectVisible, arrowEdge: .bottom) {
Expand Down

0 comments on commit da2a58b

Please sign in to comment.