File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
CodeEdit/Features/Tasks/Views Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 88import SwiftUI
99
1010struct StartTaskToolbarButton : View {
11+ @Environment ( \. controlActiveState)
12+ private var activeState
13+
1114 @UpdatingWindowController var windowController : CodeEditWindowController ?
1215
1316 @ObservedObject var taskManager : TaskManager
@@ -28,6 +31,7 @@ struct StartTaskToolbarButton: View {
2831 } label: {
2932 Label ( " Start " , systemImage: " play.fill " )
3033 . labelStyle ( . iconOnly)
34+ . opacity ( activeState == . inactive ? 0.5 : 1.0 )
3135 . font ( . system( size: 18 , weight: . regular) )
3236 . help ( " Start selected task " )
3337 . frame ( width: 28 )
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ import SwiftUI
99import Combine
1010
1111struct StopTaskToolbarButton : View {
12+ @Environment ( \. controlActiveState)
13+ private var activeState
14+
1215 @ObservedObject var taskManager : TaskManager
1316
1417 /// Tracks the current selected task's status. Updated by `updateStatusListener`
@@ -25,6 +28,7 @@ struct StopTaskToolbarButton: View {
2528 } label: {
2629 Label ( " Stop " , systemImage: " stop.fill " )
2730 . labelStyle ( . iconOnly)
31+ . opacity ( activeState == . inactive ? 0.5 : 1.0 )
2832 . font ( . system( size: 15 , weight: . regular) )
2933 . help ( " Stop selected task " )
3034 . frame ( width: 28 )
You can’t perform that action at this time.
0 commit comments