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 8
8
import SwiftUI
9
9
10
10
struct TaskNotificationView : View {
11
+ @Environment ( \. controlActiveState)
12
+ private var activeState
13
+
11
14
@ObservedObject var taskNotificationHandler : TaskNotificationHandler
12
15
@State private var isPresented : Bool = false
13
16
@State var notification : TaskNotificationModel ?
@@ -46,6 +49,7 @@ struct TaskNotificationView: View {
46
49
}
47
50
}
48
51
. transition ( . opacity. combined ( with: . move( edge: . trailing) ) )
52
+ . opacity ( activeState == . inactive ? 0.4 : 1.0 )
49
53
. padding ( 3 )
50
54
. padding ( - 3 )
51
55
. padding ( . trailing, 3 )
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ struct SchemeDropDownView: View {
11
11
@Environment ( \. colorScheme)
12
12
private var colorScheme
13
13
14
+ @Environment ( \. controlActiveState)
15
+ private var activeState
16
+
14
17
@State var isSchemePopOverPresented : Bool = false
15
18
@State private var isHoveringScheme : Bool = false
16
19
@@ -33,7 +36,9 @@ struct SchemeDropDownView: View {
33
36
Image ( systemName: " folder.badge.gearshape " )
34
37
. imageScale ( . medium)
35
38
Text ( workspaceDisplayName)
39
+ . frame ( minWidth: 0 )
36
40
}
41
+ . opacity ( activeState == . inactive ? 0.4 : 1.0 )
37
42
. font ( . subheadline)
38
43
. padding ( . trailing, 11.5 )
39
44
. padding ( . horizontal, 2.5 )
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ struct TaskDropDownView: View {
11
11
@Environment ( \. colorScheme)
12
12
private var colorScheme
13
13
14
+ @Environment ( \. controlActiveState)
15
+ private var activeState
16
+
14
17
@ObservedObject var taskManager : TaskManager
15
18
16
19
@State private var isTaskPopOverPresented : Bool = false
@@ -28,8 +31,10 @@ struct TaskDropDownView: View {
28
31
}
29
32
} else {
30
33
Text ( " Create Tasks " )
34
+ . frame ( minWidth: 0 )
31
35
}
32
36
}
37
+ . opacity ( activeState == . inactive ? 0.4 : 1.0 )
33
38
. font ( . subheadline)
34
39
. padding ( . trailing, 11.5 )
35
40
. padding ( . horizontal, 2.5 )
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ struct TaskView: View {
18
18
HStack ( spacing: 5 ) {
19
19
Image ( systemName: " gearshape " )
20
20
Text ( task. name)
21
+ . frame ( minWidth: 0 )
21
22
Spacer ( minLength: 0 )
22
23
}
23
24
. padding ( . trailing, 7.5 )
Original file line number Diff line number Diff line change 8
8
import SwiftUI
9
9
10
10
struct StartTaskToolbarButton : View {
11
+ @Environment ( \. controlActiveState)
12
+ private var activeState
13
+
11
14
@UpdatingWindowController var windowController : CodeEditWindowController ?
12
15
13
16
@ObservedObject var taskManager : TaskManager
@@ -28,6 +31,7 @@ struct StartTaskToolbarButton: View {
28
31
} label: {
29
32
Label ( " Start " , systemImage: " play.fill " )
30
33
. labelStyle ( . iconOnly)
34
+ . opacity ( activeState == . inactive ? 0.5 : 1.0 )
31
35
. font ( . system( size: 18 , weight: . regular) )
32
36
. help ( " Start selected task " )
33
37
. frame ( width: 28 )
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ import SwiftUI
9
9
import Combine
10
10
11
11
struct StopTaskToolbarButton : View {
12
+ @Environment ( \. controlActiveState)
13
+ private var activeState
14
+
12
15
@ObservedObject var taskManager : TaskManager
13
16
14
17
/// Tracks the current selected task's status. Updated by `updateStatusListener`
@@ -25,6 +28,7 @@ struct StopTaskToolbarButton: View {
25
28
} label: {
26
29
Label ( " Stop " , systemImage: " stop.fill " )
27
30
. labelStyle ( . iconOnly)
31
+ . opacity ( activeState == . inactive ? 0.5 : 1.0 )
28
32
. font ( . system( size: 15 , weight: . regular) )
29
33
. help ( " Stop selected task " )
30
34
. frame ( width: 28 )
You can’t perform that action at this time.
0 commit comments