Skip to content

Commit 993367d

Browse files
committed
Optimize UI
1 parent bd22188 commit 993367d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/kotlin/wu/seal/jsontokotlin/ui/SettingsOtherTab.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package wu.seal.jsontokotlin.ui
33
import com.intellij.ui.components.JBCheckBox
44
import com.intellij.ui.components.JBLabel
55
import com.intellij.ui.components.JBTextField
6+
import com.intellij.util.ui.JBDimension
67
import com.intellij.util.ui.JBEmptyBorder
78
import com.intellij.util.ui.JBUI
89
import wu.seal.jsontokotlin.ConfigManager
@@ -64,6 +65,8 @@ class SettingsOtherTab(layout: LayoutManager?, isDoubleBuffered: Boolean) : JPan
6465

6566

6667
val indentJPanel = JPanel()
68+
indentJPanel.border = JBEmptyBorder(0,5,0,0)
69+
indentJPanel.maximumSize = JBDimension(400, 30)
6770
indentJPanel.layout = FlowLayout(FlowLayout.LEFT)
6871
indentJPanel.add(JBLabel("Indent (number of space): "))
6972
val indentField = JBTextField(2)
@@ -96,7 +99,8 @@ class SettingsOtherTab(layout: LayoutManager?, isDoubleBuffered: Boolean) : JPan
9699
indentJPanel.add(indentField)
97100

98101
val parentClassPanel = JPanel()
99-
parentClassPanel.border = JBEmptyBorder(0)
102+
parentClassPanel.maximumSize = JBDimension(400, 30)
103+
parentClassPanel.border = JBEmptyBorder(0,5,0,0)
100104
parentClassPanel.layout = FlowLayout(FlowLayout.LEFT)
101105
parentClassPanel.add(JBLabel("Parent Class Template: "))
102106
val parentClassField = JBTextField(20)
@@ -133,14 +137,15 @@ class SettingsOtherTab(layout: LayoutManager?, isDoubleBuffered: Boolean) : JPan
133137
addComponentIntoVerticalBoxAlignmentLeft(enableAutoReformat)
134138
addComponentIntoVerticalBoxAlignmentLeft(enableAutoReformatNoteLable)
135139

136-
add(Box.createVerticalStrut(JBUI.scale(10)))
137140

138141
addComponentIntoVerticalBoxAlignmentLeft(indentJPanel)
139142

140-
add(Box.createVerticalStrut(JBUI.scale(10)))
141143

142144
addComponentIntoVerticalBoxAlignmentLeft(parentClassPanel)
143145

146+
add(Box.createVerticalGlue())
147+
148+
144149
}
145150

146151
}

0 commit comments

Comments
 (0)