Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Run" icons across the main interface #5441

Merged
merged 3 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Platform/Shared/VMCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ struct VMCardView: View {
@EnvironmentObject private var data: UTMData

#if os(macOS)
let buttonColor: Color = .black
typealias PlatformImage = NSImage
#else
let buttonColor: Color = .accentColor
typealias PlatformImage = UIImage
#endif

Expand All @@ -51,9 +49,8 @@ struct VMCardView: View {
Button {
data.run(vm: vm)
} label: {
Label("Run", systemImage: "play.circle")
Label("Run", systemImage: "play.circle.fill")
.font(.largeTitle)
.foregroundColor(buttonColor)
.labelStyle(.iconOnly)
}
} else if vm.isBusy {
Expand Down
8 changes: 4 additions & 4 deletions Platform/Shared/VMContextMenuModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ struct VMContextMenuModifier: ViewModifier {
Button {
confirmAction = .confirmStopVM
} label: {
Label("Stop", systemImage: "stop.fill")
Label("Stop", systemImage: "stop")
}.help("Stop the running VM.")
} else if !vm.isModifyAllowed { // paused
Button {
data.run(vm: vm)
} label: {
Label("Resume", systemImage: "playpause.fill")
Label("Resume", systemImage: "playpause")
}.help("Resume running VM.")
} else {
Divider()

Button {
data.run(vm: vm)
} label: {
Label("Run", systemImage: "play.fill")
Label("Run", systemImage: "play")
}.help("Run the VM in the foreground.")

#if os(macOS) && arch(arm64)
Expand All @@ -75,7 +75,7 @@ struct VMContextMenuModifier: ViewModifier {
Button {
data.run(vm: vm, options: .bootDisposibleMode)
} label: {
Label("Run without saving changes", systemImage: "play")
Label("Run without saving changes", systemImage: "memories")
}.help("Run the VM in the foreground, without saving data changes to disk.")
}

Expand Down
4 changes: 2 additions & 2 deletions Platform/Shared/VMToolbarModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ struct VMToolbarModifier: ViewModifier {
Button {
confirmAction = .confirmStopVM
} label: {
Label("Stop", systemImage: "stop.fill")
Label("Stop", systemImage: "stop")
.labelStyle(.iconOnly)
}.help("Stop selected VM")
.padding(.leading, padding)
} else {
Button {
data.run(vm: data.selectedVM!)
} label: {
Label("Run", systemImage: "play.fill")
Label("Run", systemImage: "play")
.labelStyle(.iconOnly)
}.help("Run selected VM")
.padding(.leading, padding)
Expand Down