File tree Expand file tree Collapse file tree 6 files changed +23
-0
lines changed
Expand file tree Collapse file tree 6 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 88import SwiftUI
99
1010struct TaskNotificationView : View {
11+ @Environment ( \. controlActiveState)
12+ private var activeState
13+
1114 @ObservedObject var taskNotificationHandler : TaskNotificationHandler
1215 @State private var isPresented : Bool = false
1316 @State var notification : TaskNotificationModel ?
@@ -46,6 +49,7 @@ struct TaskNotificationView: View {
4649 }
4750 }
4851 . transition ( . opacity. combined ( with: . move( edge: . trailing) ) )
52+ . opacity ( activeState == . inactive ? 0.4 : 1.0 )
4953 . padding ( 3 )
5054 . padding ( - 3 )
5155 . padding ( . trailing, 3 )
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ struct SchemeDropDownView: View {
1111 @Environment ( \. colorScheme)
1212 private var colorScheme
1313
14+ @Environment ( \. controlActiveState)
15+ private var activeState
16+
1417 @State var isSchemePopOverPresented : Bool = false
1518 @State private var isHoveringScheme : Bool = false
1619
@@ -33,7 +36,9 @@ struct SchemeDropDownView: View {
3336 Image ( systemName: " folder.badge.gearshape " )
3437 . imageScale ( . medium)
3538 Text ( workspaceDisplayName)
39+ . frame ( minWidth: 0 )
3640 }
41+ . opacity ( activeState == . inactive ? 0.4 : 1.0 )
3742 . font ( . subheadline)
3843 . padding ( . trailing, 11.5 )
3944 . padding ( . horizontal, 2.5 )
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ struct TaskDropDownView: View {
1111 @Environment ( \. colorScheme)
1212 private var colorScheme
1313
14+ @Environment ( \. controlActiveState)
15+ private var activeState
16+
1417 @ObservedObject var taskManager : TaskManager
1518
1619 @State private var isTaskPopOverPresented : Bool = false
@@ -28,8 +31,10 @@ struct TaskDropDownView: View {
2831 }
2932 } else {
3033 Text ( " Create Tasks " )
34+ . frame ( minWidth: 0 )
3135 }
3236 }
37+ . opacity ( activeState == . inactive ? 0.4 : 1.0 )
3338 . font ( . subheadline)
3439 . padding ( . trailing, 11.5 )
3540 . padding ( . horizontal, 2.5 )
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ struct TaskView: View {
1818 HStack ( spacing: 5 ) {
1919 Image ( systemName: " gearshape " )
2020 Text ( task. name)
21+ . frame ( minWidth: 0 )
2122 Spacer ( minLength: 0 )
2223 }
2324 . padding ( . trailing, 7.5 )
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