Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e0ad549

Browse files
committedJul 13, 2022
Fix: no alignment for the workspace status colum
- resolves #40
1 parent 006208b commit e0ad549

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/main/kotlin/com/coder/gateway/views/steps/WorkspaceCellRenderer.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.coder.gateway.sdk.OS
99
import com.coder.gateway.sdk.v2.models.ProvisionerJobStatus
1010
import com.coder.gateway.sdk.v2.models.WorkspaceBuildTransition
1111
import com.intellij.ui.dsl.builder.panel
12+
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
1213
import com.intellij.util.ui.JBFont
1314
import java.awt.Component
1415
import javax.swing.JList
@@ -23,11 +24,12 @@ class WorkspaceCellRenderer : ListCellRenderer<WorkspaceAgentModel> {
2324
icon(iconForImageTag(workspace))
2425
label(workspace.name).applyToComponent {
2526
font = JBFont.h3()
26-
}
27+
}.resizableColumn().horizontalAlign(HorizontalAlign.FILL)
2728
panel {
2829
row {
2930
icon(iconForStatus(workspace))
3031
label(labelForStatus(workspace))
32+
cell()
3133
}
3234
}
3335
}
@@ -43,7 +45,7 @@ class WorkspaceCellRenderer : ListCellRenderer<WorkspaceAgentModel> {
4345
}
4446
}
4547

46-
private fun iconForImageTag(workspace: WorkspaceAgentModel) = when (workspace?.agentOS) {
48+
private fun iconForImageTag(workspace: WorkspaceAgentModel) = when (workspace.agentOS) {
4749
OS.LINUX -> CoderIcons.LINUX
4850
OS.WINDOWS -> CoderIcons.WINDOWS
4951
OS.MAC -> CoderIcons.MACOS

0 commit comments

Comments
 (0)
Failed to load comments.