File tree Expand file tree Collapse file tree 3 files changed +11
-16
lines changed
Coder-Desktop/Coder-Desktop Expand file tree Collapse file tree 3 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ enum Theme {
88
99 static let rectCornerRadius : CGFloat = 4
1010
11- static let appIconWidth : CGFloat = 30
12- static let appIconHeight : CGFloat = 30
11+ static let appIconWidth : CGFloat = 17
12+ static let appIconHeight : CGFloat = 17
1313 static let appIconSize : CGSize = . init( width: appIconWidth, height: appIconHeight)
1414 }
1515
Original file line number Diff line number Diff line change @@ -180,20 +180,18 @@ struct MenuItemView: View {
180180}
181181
182182struct MenuItemCollapsibleView : View {
183- private let defaultVisibleApps = 5
183+ private let defaultVisibleApps = 6
184184 let apps : [ WorkspaceApp ]
185185
186186 var body : some View {
187- HStack ( spacing: 17 ) {
187+ HStack ( spacing: 16 ) {
188188 ForEach ( apps. prefix ( defaultVisibleApps) , id: \. id) { app in
189189 WorkspaceAppIcon ( app: app)
190190 . frame ( width: Theme . Size. appIconWidth, height: Theme . Size. appIconHeight)
191191 }
192- if apps. count < defaultVisibleApps {
193- Spacer ( )
194- }
192+ Spacer ( )
195193 }
196- . padding ( . leading, apps . count < defaultVisibleApps ? 14 : 0 )
194+ . padding ( . leading, 32 )
197195 . padding ( . bottom, 5 )
198196 . padding ( . top, 10 )
199197 }
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ struct WorkspaceAppIcon: View {
1919 ) { $0 }
2020 placeholder: {
2121 if app. icon != nil {
22- ProgressView ( )
22+ ProgressView ( ) . controlSize ( . small )
2323 } else {
24- Text ( app . displayName ) . frame (
24+ Image ( systemName : " questionmark " ) . frame (
2525 width: Theme . Size. appIconWidth,
2626 height: Theme . Size. appIconHeight
2727 )
@@ -30,14 +30,11 @@ struct WorkspaceAppIcon: View {
3030 width: Theme . Size. appIconWidth,
3131 height: Theme . Size. appIconHeight
3232 )
33- } . padding ( 4 )
33+ } . padding ( 6 )
3434 }
35+ . background ( isHovering ? Color . accentColor. opacity ( 0.8 ) : . clear)
3536 . 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 }
4138 . simultaneousGesture (
4239 DragGesture ( minimumDistance: 0 )
4340 . onChanged { _ in
You can’t perform that action at this time.
0 commit comments