Align checkbox labels in scratch panel

^KT-24315 Fixed
This commit is contained in:
Natalia Selezneva
2018-05-08 09:42:01 +03:00
parent e5a40c8c7f
commit 522587dc5d
@@ -64,7 +64,7 @@ class ScratchTopPanel private constructor(val scratchFile: ScratchFile) : JPanel
add(JSeparator(SwingConstants.VERTICAL))
isReplCheckbox = JCheckBox("Use REPL", false).customize()
isReplCheckbox = JCheckBox("Use REPL", false)
add(isReplCheckbox)
isReplCheckbox.addItemListener {
scratchFile.getPsiFile()?.virtualFile?.apply {
@@ -74,7 +74,7 @@ class ScratchTopPanel private constructor(val scratchFile: ScratchFile) : JPanel
add(JSeparator(SwingConstants.VERTICAL))
isMakeBeforeRunCheckbox = JCheckBox("Make before Run", false).customize()
isMakeBeforeRunCheckbox = JCheckBox("Make before Run", false)
add(isMakeBeforeRunCheckbox)
isMakeBeforeRunCheckbox.addItemListener {
scratchFile.getPsiFile()?.virtualFile?.apply {
@@ -119,11 +119,6 @@ class ScratchTopPanel private constructor(val scratchFile: ScratchFile) : JPanel
isMakeBeforeRunCheckbox.isSelected = isSelected
}
private fun JCheckBox.customize(): JCheckBox {
verticalTextPosition = SwingConstants.BOTTOM
return this
}
private fun createActionsToolbar(): JComponent {
val toolbarGroup = DefaultActionGroup().apply {
add(RunScratchAction(this@ScratchTopPanel))