Skip to content

Commit 7b31363

Browse files
committed
Fix: layout improvements
- gaps between hostnames and previous connection details - right margin
1 parent f0aefac commit 7b31363

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

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

+23-23
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenUIManager
99
import com.intellij.ui.components.ActionLink
1010
import com.intellij.ui.components.JBScrollPane
1111
import com.intellij.ui.dsl.builder.BottomGap
12+
import com.intellij.ui.dsl.builder.TopGap
1213
import com.intellij.ui.dsl.builder.panel
1314
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
1415
import com.intellij.util.ui.JBFont
@@ -60,39 +61,38 @@ class CoderGatewayRecentWorkspaceConnectionsView : GatewayRecentConnections {
6061
}.horizontalAlign(HorizontalAlign.LEFT)
6162
cell()
6263
}
63-
}
64+
}.topGap(TopGap.MEDIUM)
6465

65-
group {
66-
recentConnections.forEach { connectionDetails ->
67-
val product = IntelliJPlatformProduct.fromProductCode(connectionDetails.ideProductCode!!)!!
68-
row {
69-
icon(product.icon)
70-
cell(ActionLink(connectionDetails.projectPath!!) {
71-
cs.launch {
72-
GatewayUI.getInstance().connect(
73-
mapOf(
74-
"type" to "coder",
75-
"coder_workspace_hostname" to "${connectionDetails.coderWorkspaceHostname}",
76-
"project_path" to connectionDetails.projectPath!!,
77-
"ide_product_code" to "${product.productCode}",
78-
"ide_build_number" to "${connectionDetails.ideBuildNumber}",
79-
"ide_download_link" to "${connectionDetails.downloadSource}"
80-
)
66+
recentConnections.forEach { connectionDetails ->
67+
val product = IntelliJPlatformProduct.fromProductCode(connectionDetails.ideProductCode!!)!!
68+
row {
69+
icon(product.icon)
70+
cell(ActionLink(connectionDetails.projectPath!!) {
71+
cs.launch {
72+
GatewayUI.getInstance().connect(
73+
mapOf(
74+
"type" to "coder",
75+
"coder_workspace_hostname" to "${connectionDetails.coderWorkspaceHostname}",
76+
"project_path" to connectionDetails.projectPath!!,
77+
"ide_product_code" to "${product.productCode}",
78+
"ide_build_number" to "${connectionDetails.ideBuildNumber}",
79+
"ide_download_link" to "${connectionDetails.downloadSource}"
8180
)
82-
}
83-
})
84-
label("").resizableColumn().horizontalAlign(HorizontalAlign.FILL)
85-
label("Last opened: ${connectionDetails.lastOpened}").horizontalAlign(HorizontalAlign.RIGHT).applyToComponent {
86-
foreground = JBUI.CurrentTheme.ContextHelp.FOREGROUND
87-
font = ComponentPanelBuilder.getCommentFont(font)
81+
)
8882
}
83+
})
84+
label("").resizableColumn().horizontalAlign(HorizontalAlign.FILL)
85+
label("Last opened: ${connectionDetails.lastOpened}").horizontalAlign(HorizontalAlign.RIGHT).applyToComponent {
86+
foreground = JBUI.CurrentTheme.ContextHelp.FOREGROUND
87+
font = ComponentPanelBuilder.getCommentFont(font)
8988
}
9089
}
9190
}
9291
}
9392
}
9493
}.apply {
9594
background = WelcomeScreenUIManager.getMainAssociatedComponentBackground()
95+
border = JBUI.Borders.empty(0, 0, 0, 12)
9696
}
9797
}
9898
}

0 commit comments

Comments
 (0)