Skip to content

Commit b9a790f

Browse files
committed
Remove extra top gap from recents window
1 parent 92c84a8 commit b9a790f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/kotlin/com/coder/gateway/views/CoderGatewayRecentWorkspaceConnectionsView.kt

+7-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
131131
}
132132
}
133133
}
134-
}.bottomGap(BottomGap.MEDIUM)
134+
}.bottomGap(BottomGap.SMALL)
135135
separator(background = WelcomeScreenUIManager.getSeparatorColor())
136136
row {
137137
resizableRow()
@@ -158,6 +158,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
158158
* Render the most recent connections, matching with fetched workspaces.
159159
*/
160160
private fun updateContentView() {
161+
var top = true
161162
val connections = getConnectionsByDeployment(true)
162163
recentWorkspacesContentPanel.viewport.view = panel {
163164
connections.forEach { (deploymentURL, connectionsByWorkspace) ->
@@ -172,6 +173,10 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
172173
} else {
173174
Triple(AnimatedIcon.Default.INSTANCE, UIUtil.getContextHelpForeground(), "Querying workspace status...")
174175
}
176+
val gap = if (top) {
177+
top = false
178+
TopGap.NONE
179+
} else TopGap.MEDIUM
175180
row {
176181
icon(status.first).applyToComponent {
177182
foreground = status.second
@@ -212,7 +217,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
212217
}
213218
}
214219
})
215-
}.topGap(TopGap.MEDIUM)
220+
}.topGap(gap)
216221
row {
217222
label(status.third).applyToComponent { foreground = status.second }
218223
}

0 commit comments

Comments
 (0)