11package wu.seal.jsontokotlin
22
3+ import com.intellij.util.ui.JBDimension
4+ import com.intellij.util.ui.JBUI
5+ import com.intellij.util.xml.ui.TextPanel
36import java.awt.*
47import javax.swing.*
58import javax.swing.border.EmptyBorder
@@ -21,7 +24,8 @@ class PropertyPanel(layout: LayoutManager?, isDoubleBuffered: Boolean) : JPanel(
2124
2225 val boxLayout = BoxLayout (this , BoxLayout .PAGE_AXIS )
2326 setLayout(boxLayout)
24- border = EmptyBorder (10 , 10 , 10 , 10 )
27+ val bordWidth = JBUI .scale(10 )
28+ border = EmptyBorder (bordWidth, bordWidth, bordWidth, bordWidth)
2529
2630 val keywordLable = JLabel (" Keyword" )
2731
@@ -56,11 +60,10 @@ class PropertyPanel(layout: LayoutManager?, isDoubleBuffered: Boolean) : JPanel(
5660 add(Box .createVerticalStrut(20 ))
5761
5862
59- val line = JPanel ()
60- line.maximumSize = Dimension (1000 , 1 )
61- line.minimumSize = Dimension (500 , 1 )
62- line.preferredSize = Dimension (800 , 1 )
63- line.background = Color .BLACK
63+ val line = TextPanel ()
64+ line.maximumSize = JBDimension (480 , 1 )
65+ line.minimumSize = JBDimension (480 , 1 )
66+ line.background = Color .GRAY
6467
6568 add(line)
6669
@@ -103,9 +106,9 @@ class CommentConfigPanel(layout: LayoutManager?, isDoubleBuffered: Boolean) : JP
103106
104107 init {
105108
106- border = EmptyBorder ( 10 , 10 , 10 , 10 )
107-
108- setLayout(GridLayout (5 , 1 , 10 , 10 ))
109+ val bordWidth = JBUI .scale( 10 )
110+ border = EmptyBorder (bordWidth, bordWidth, bordWidth, bordWidth)
111+ setLayout(GridLayout (6 , 1 , 10 , 10 ))
109112
110113 val radioButtonOpen = JRadioButton (" On" )
111114
@@ -145,9 +148,10 @@ class TargetJsonLibConfigPanel(layout: LayoutManager?, isDoubleBuffered: Boolean
145148
146149 init {
147150
148- border = EmptyBorder (10 , 10 , 10 , 10 )
151+ val bordWidth = JBUI .scale(10 )
152+ border = EmptyBorder (bordWidth, bordWidth, bordWidth, bordWidth)
149153
150- setLayout(GridLayout (5 , 1 , 10 , 10 ))
154+ setLayout(GridLayout (6 , 1 , 10 , 10 ))
151155
152156 val radioButtonNone = JRadioButton (" None" )
153157
0 commit comments