@@ -42,6 +42,7 @@ import com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenUIManager
42
42
import com.intellij.ui.AnActionButton
43
43
import com.intellij.ui.AppIcon
44
44
import com.intellij.ui.JBColor
45
+ import com.intellij.ui.RelativeFont
45
46
import com.intellij.ui.ToolbarDecorator
46
47
import com.intellij.ui.components.JBTextField
47
48
import com.intellij.ui.components.dialog
@@ -643,20 +644,20 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
643
644
644
645
override fun getTableCellRendererComponent (table : JTable ? , value : Any? , selected : Boolean , focus : Boolean , row : Int , column : Int ): Component {
645
646
super .getTableCellRendererComponent(table, value, selected, focus, row, column).apply {
646
- border = JBUI .Borders .empty(10 )
647
+ border = JBUI .Borders .empty(8 , 8 )
647
648
}
648
649
return this
649
650
}
650
651
}
651
652
}
652
653
}
653
654
654
- private class WorkspaceNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
655
+ private inner class WorkspaceNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
655
656
override fun valueOf (workspace : WorkspaceAgentModel ? ): String? {
656
657
return workspace?.name
657
658
}
658
659
659
- override fun getComparator (): Comparator <WorkspaceAgentModel >? {
660
+ override fun getComparator (): Comparator <WorkspaceAgentModel > {
660
661
return Comparator { a, b ->
661
662
if (a == = b) 0
662
663
if (a == null ) - 1
@@ -673,20 +674,21 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
673
674
if (value is String ) {
674
675
text = value
675
676
}
676
- font = JBFont .h3().asBold()
677
- border = JBUI .Borders .empty()
677
+
678
+ font = RelativeFont .BOLD .derive(this @CoderWorkspacesStepView.tableOfWorkspaces.tableHeader.font)
679
+ border = JBUI .Borders .empty(0 , 8 )
678
680
return this
679
681
}
680
682
}
681
683
}
682
684
}
683
685
684
- private class WorkspaceTemplateNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
686
+ private inner class WorkspaceTemplateNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
685
687
override fun valueOf (workspace : WorkspaceAgentModel ? ): String? {
686
688
return workspace?.templateName
687
689
}
688
690
689
- override fun getComparator (): java.util.Comparator <WorkspaceAgentModel >? {
691
+ override fun getComparator (): java.util.Comparator <WorkspaceAgentModel > {
690
692
return Comparator { a, b ->
691
693
if (a == = b) 0
692
694
if (a == null ) - 1
@@ -697,7 +699,7 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
697
699
}
698
700
699
701
override fun getRenderer (item : WorkspaceAgentModel ? ): TableCellRenderer {
700
- val simpleH3 = JBFont .h3()
702
+ val simpleH3 = this @CoderWorkspacesStepView.tableOfWorkspaces.tableHeader.font
701
703
702
704
val h3AttributesWithUnderlining = simpleH3.attributes as MutableMap <TextAttribute , Any >
703
705
h3AttributesWithUnderlining[TextAttribute .UNDERLINE ] = UNDERLINE_ON
@@ -708,7 +710,7 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
708
710
if (value is String ) {
709
711
text = value
710
712
}
711
- border = JBUI .Borders .empty()
713
+ border = JBUI .Borders .empty(0 , 8 )
712
714
713
715
if (table.getClientProperty(MOUSE_OVER_TEMPLATE_NAME_COLUMN_ON_ROW ) != null ) {
714
716
val mouseOverRow = table.getClientProperty(MOUSE_OVER_TEMPLATE_NAME_COLUMN_ON_ROW ) as Int
@@ -724,7 +726,7 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
724
726
}
725
727
}
726
728
727
- private class WorkspaceVersionColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
729
+ private inner class WorkspaceVersionColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
728
730
override fun valueOf (workspace : WorkspaceAgentModel ? ): String? {
729
731
return workspace?.status?.label
730
732
}
@@ -736,20 +738,20 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
736
738
if (value is String ) {
737
739
text = value
738
740
}
739
- font = JBFont .h3()
740
- border = JBUI .Borders .empty()
741
+ font = this @CoderWorkspacesStepView.tableOfWorkspaces.tableHeader.font
742
+ border = JBUI .Borders .empty(0 , 8 )
741
743
return this
742
744
}
743
745
}
744
746
}
745
747
}
746
748
747
- private class WorkspaceStatusColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
749
+ private inner class WorkspaceStatusColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentModel, String>(columnName) {
748
750
override fun valueOf (workspace : WorkspaceAgentModel ? ): String? {
749
751
return workspace?.agentStatus?.label
750
752
}
751
753
752
- override fun getComparator (): java.util.Comparator <WorkspaceAgentModel >? {
754
+ override fun getComparator (): java.util.Comparator <WorkspaceAgentModel > {
753
755
return Comparator { a, b ->
754
756
if (a == = b) 0
755
757
if (a == null ) - 1
@@ -766,8 +768,8 @@ class CoderWorkspacesStepView(val enableNextButtonCallback: (Boolean) -> Unit) :
766
768
if (value is String ) {
767
769
text = value
768
770
}
769
- font = JBFont .h3()
770
- border = JBUI .Borders .empty()
771
+ font = this @CoderWorkspacesStepView.tableOfWorkspaces.tableHeader.font
772
+ border = JBUI .Borders .empty(0 , 8 )
771
773
foreground = (table.model as ListTableModel <WorkspaceAgentModel >).getRowValue(row).statusColor()
772
774
return this
773
775
}
0 commit comments