Skip to content

Commit 3658ed2

Browse files
committed
Fix overlapping search bar
1 parent 7cc30b7 commit 3658ed2

File tree

2 files changed

+24
-33
lines changed

2 files changed

+24
-33
lines changed

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

+23-32
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ import java.awt.Component
5757
import java.awt.Dimension
5858
import java.util.Locale
5959
import javax.swing.JComponent
60-
import javax.swing.JLabel
6160
import javax.swing.event.DocumentEvent
6261

6362
/**
@@ -101,38 +100,30 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
101100
label(CoderGatewayBundle.message("gateway.connector.recent-connections.title")).applyToComponent {
102101
font = JBFont.h3().asBold()
103102
}
104-
panel {
105-
indent {
106-
row {
107-
cell(JLabel()).resizableColumn().align(AlignX.FILL)
108-
searchBar =
109-
cell(SearchTextField(false)).resizableColumn().align(AlignX.FILL).applyToComponent {
110-
minimumSize = Dimension(350, -1)
111-
textEditor.border = JBUI.Borders.empty(2, 5, 2, 0)
112-
addDocumentListener(
113-
object : DocumentAdapter() {
114-
override fun textChanged(e: DocumentEvent) {
115-
filterString = this@applyToComponent.text.trim()
116-
updateContentView()
117-
}
118-
},
119-
)
120-
}.component
121-
122-
actionButton(
123-
object : DumbAwareAction(
124-
CoderGatewayBundle.message("gateway.connector.recent-connections.new.wizard.button.tooltip"),
125-
null,
126-
AllIcons.General.Add,
127-
) {
128-
override fun actionPerformed(e: AnActionEvent) {
129-
setContentCallback(CoderGatewayConnectorWizardWrapperView().component)
130-
}
131-
},
132-
).gap(RightGap.SMALL)
103+
searchBar =
104+
cell(SearchTextField(false)).resizableColumn().align(AlignX.FILL).applyToComponent {
105+
minimumSize = Dimension(350, -1)
106+
textEditor.border = JBUI.Borders.empty(2, 5, 2, 0)
107+
addDocumentListener(
108+
object : DocumentAdapter() {
109+
override fun textChanged(e: DocumentEvent) {
110+
filterString = this@applyToComponent.text.trim()
111+
updateContentView()
112+
}
113+
},
114+
)
115+
}.component
116+
actionButton(
117+
object : DumbAwareAction(
118+
CoderGatewayBundle.message("gateway.connector.recent-connections.new.wizard.button.tooltip"),
119+
null,
120+
AllIcons.General.Add,
121+
) {
122+
override fun actionPerformed(e: AnActionEvent) {
123+
setContentCallback(CoderGatewayConnectorWizardWrapperView().component)
133124
}
134-
}
135-
}
125+
},
126+
).gap(RightGap.SMALL)
136127
}.bottomGap(BottomGap.SMALL)
137128
separator(background = WelcomeScreenUIManager.getSeparatorColor())
138129
row {

src/main/resources/messages/CoderGatewayBundle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ gateway.connector.view.coder.remoteproject.choose.text=Choose IDE and project fo
5656
gateway.connector.view.coder.remoteproject.ide.download.comment=This IDE will be downloaded and installed to the default path on the remote host.
5757
gateway.connector.view.coder.remoteproject.ide.installed.comment=This IDE is already installed and will be used as-is.
5858
gateway.connector.view.coder.remoteproject.ide.none.comment=No IDE selected.
59-
gateway.connector.recent-connections.title=Recent Coder workspaces
59+
gateway.connector.recent-connections.title=Recent projects
6060
gateway.connector.recent-connections.new.wizard.button.tooltip=Open a new Coder workspace
6161
gateway.connector.recent-connections.remove.button.tooltip=Remove from recent connections
6262
gateway.connector.recent-connections.terminal.button.tooltip=Open SSH web terminal

0 commit comments

Comments
 (0)