File tree 3 files changed +11
-16
lines changed
Coder-Desktop/Coder-Desktop
3 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ enum Theme {
8
8
9
9
static let rectCornerRadius : CGFloat = 4
10
10
11
- static let appIconWidth : CGFloat = 30
12
- static let appIconHeight : CGFloat = 30
11
+ static let appIconWidth : CGFloat = 17
12
+ static let appIconHeight : CGFloat = 17
13
13
static let appIconSize : CGSize = . init( width: appIconWidth, height: appIconHeight)
14
14
}
15
15
Original file line number Diff line number Diff line change @@ -180,20 +180,18 @@ struct MenuItemView: View {
180
180
}
181
181
182
182
struct MenuItemCollapsibleView : View {
183
- private let defaultVisibleApps = 5
183
+ private let defaultVisibleApps = 6
184
184
let apps : [ WorkspaceApp ]
185
185
186
186
var body : some View {
187
- HStack ( spacing: 17 ) {
187
+ HStack ( spacing: 16 ) {
188
188
ForEach ( apps. prefix ( defaultVisibleApps) , id: \. id) { app in
189
189
WorkspaceAppIcon ( app: app)
190
190
. frame ( width: Theme . Size. appIconWidth, height: Theme . Size. appIconHeight)
191
191
}
192
- if apps. count < defaultVisibleApps {
193
- Spacer ( )
194
- }
192
+ Spacer ( )
195
193
}
196
- . padding ( . leading, apps . count < defaultVisibleApps ? 14 : 0 )
194
+ . padding ( . leading, 32 )
197
195
. padding ( . bottom, 5 )
198
196
. padding ( . top, 10 )
199
197
}
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ struct WorkspaceAppIcon: View {
19
19
) { $0 }
20
20
placeholder: {
21
21
if app. icon != nil {
22
- ProgressView ( )
22
+ ProgressView ( ) . controlSize ( . small )
23
23
} else {
24
- Text ( app . displayName ) . frame (
24
+ Image ( systemName : " questionmark " ) . frame (
25
25
width: Theme . Size. appIconWidth,
26
26
height: Theme . Size. appIconHeight
27
27
)
@@ -30,14 +30,11 @@ struct WorkspaceAppIcon: View {
30
30
width: Theme . Size. appIconWidth,
31
31
height: Theme . Size. appIconHeight
32
32
)
33
- } . padding ( 4 )
33
+ } . padding ( 6 )
34
34
}
35
+ . background ( isHovering ? Color . accentColor. opacity ( 0.8 ) : . clear)
35
36
. clipShape ( RoundedRectangle ( cornerRadius: 8 ) )
36
- . overlay (
37
- RoundedRectangle ( cornerRadius: Theme . Size. rectCornerRadius * 2 )
38
- . stroke ( . secondary, lineWidth: 1 )
39
- . opacity ( isHovering && !isPressed ? 0.6 : 0.3 )
40
- ) . onHover { hovering in isHovering = hovering }
37
+ . onHover { hovering in isHovering = hovering }
41
38
. simultaneousGesture (
42
39
DragGesture ( minimumDistance: 0 )
43
40
. onChanged { _ in
You can’t perform that action at this time.
0 commit comments