Skip to content

Commit 79b0f7c

Browse files
1 parent 6417d16 commit 79b0f7c

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

Coder-Desktop/Coder-Desktop/Theme.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenuItem.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,18 @@ struct MenuItemView: View {
180180
}
181181

182182
struct 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
}

Coder-Desktop/Coder-Desktop/Views/VPN/WorkspaceAppIcon.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy