Fetch up to 100 results... and fix the layout when filtering

This commit is contained in:
downthecrop 2025-09-18 22:56:39 -07:00
parent 5dd299ecdd
commit 3fae644550
2 changed files with 23 additions and 22 deletions

View file

@ -262,26 +262,27 @@ object ReflectiveEditorView : View {
System.out.println("Matching plugin statuses: ${matchingPluginStatuses.size}")
// Add a separator
val separator = JPanel()
separator.background = VIEW_BACKGROUND_COLOR
separator.preferredSize = Dimension(Int.MAX_VALUE, 1)
separator.maximumSize = Dimension(Int.MAX_VALUE, 1)
panel.add(Box.createVerticalStrut(10))
panel.add(separator)
panel.add(Box.createVerticalStrut(5))
// Add a header for available plugins
// Always add the label even if there are no matching plugins to maintain proper layout
val headerPanel = JPanel(FlowLayout(FlowLayout.LEFT))
headerPanel.background = VIEW_BACKGROUND_COLOR
val headerLabel = JLabel(if (matchingPluginStatuses.isNotEmpty()) "Available Plugins" else "")
headerLabel.foreground = secondaryColor
headerLabel.font = Font("RuneScape Small", Font.BOLD, 16)
headerPanel.add(headerLabel)
panel.add(headerPanel)
panel.add(Box.createVerticalStrut(5))
if (matchingPluginStatuses.isNotEmpty()) {
// Add a separator
val separator = JPanel()
separator.background = VIEW_BACKGROUND_COLOR
separator.preferredSize = Dimension(Int.MAX_VALUE, 1)
separator.maximumSize = Dimension(Int.MAX_VALUE, 1)
panel.add(Box.createVerticalStrut(10))
panel.add(separator)
panel.add(Box.createVerticalStrut(5))
// Add a header for available plugins
val headerPanel = JPanel(FlowLayout(FlowLayout.LEFT))
headerPanel.background = VIEW_BACKGROUND_COLOR
val headerLabel = JLabel("Available Plugins")
headerLabel.foreground = secondaryColor
headerLabel.font = Font("RuneScape Small", Font.BOLD, 16)
headerPanel.add(headerLabel)
panel.add(headerPanel)
panel.add(Box.createVerticalStrut(5))
// Add download all button if there are multiple plugins
if (matchingPluginStatuses.size > 1) {
val downloadAllPanel = JPanel(FlowLayout(FlowLayout.LEFT))