@@ -7,14 +7,14 @@ import com.intellij.openapi.project.Project
7
7
import com.intellij.ui.components.JBCheckBox
8
8
import com.intellij.ui.components.JBTextField
9
9
import com.intellij.ui.components.textFieldWithHistoryWithBrowseButton
10
+ import com.intellij.ui.dsl.builder.AlignX
10
11
import com.intellij.ui.dsl.builder.COLUMNS_LARGE
12
+ import com.intellij.ui.dsl.builder.RowLayout
11
13
import com.intellij.ui.dsl.builder.columns
12
14
import com.intellij.ui.dsl.builder.panel
13
15
import com.intellij.ui.layout.selected
14
16
import com.intellij.util.application
15
- import java.awt.BorderLayout
16
17
import javax.swing.JComponent
17
- import javax.swing.JPanel
18
18
19
19
class MiseConfigurable (
20
20
private val project : Project ,
@@ -38,42 +38,38 @@ class MiseConfigurable(
38
38
myMiseDirEnvCb.isSelected = service.state.useMiseDirEnv
39
39
myMiseConfigEnvironmentTf.text = service.state.miseConfigEnvironment
40
40
41
- return JPanel (BorderLayout ()).apply {
42
- add(
43
- panel {
44
- row(" Mise Executable:" ) {
45
- cell(
46
- myMiseExecutableTf.apply {
47
- setTextFieldPreferredWidth(50 )
48
- },
49
- ).comment(
41
+ return panel {
42
+ row(" Mise Executable:" ) {
43
+ cell(myMiseExecutableTf)
44
+ .align(AlignX .FILL )
45
+ .comment(
46
+ """
47
+ Specify the path to the mise executable.</br>
48
+ Not installed? Visit the <a href='https://mise.jdx.dev/installing-mise.html'>mise installation</a>
49
+ """ .trimIndent(),
50
+ )
51
+ }
52
+
53
+ groupRowsRange(" Environments" ) {
54
+ row {
55
+ cell(myMiseDirEnvCb)
56
+ .align(AlignX .FILL )
57
+ .resizableColumn()
58
+ .comment(" Load environment variables from mise configuration file(s)" )
59
+ }.layout(RowLayout .PARENT_GRID )
60
+ row(" Config Environment:" ) {
61
+ cell(myMiseConfigEnvironmentTf)
62
+ .columns(COLUMNS_LARGE )
63
+ .resizableColumn()
64
+ .comment(
50
65
"""
51
- Specify the path to the mise executable.</br >
52
- Not installed? Visit the <a href='https://mise.jdx.dev/installing-mise .html'>mise installation </a>
66
+ Specify the mise configuration environment to use (leave empty for default) <br/ >
67
+ <a href='https://mise.jdx.dev/configuration/environments .html'>Learn more about mise configuration environments </a>
53
68
""" .trimIndent(),
54
- ).resizableColumn()
55
- }
56
-
57
- group(" Environments" ) {
58
- row {
59
- cell(myMiseDirEnvCb).comment(
60
- " Load environment variables from mise configuration file(s)" ,
61
- )
62
- }
63
- row(" Config Environment:" ) {
64
- cell(myMiseConfigEnvironmentTf)
65
- .comment(
66
- """
67
- Specify the mise configuration environment to use (leave empty for default) <br/>
68
- <a href='https://mise.jdx.dev/configuration/environments.html'>Learn more about mise configuration environments</a>
69
- """ .trimIndent(),
70
- ).columns(COLUMNS_LARGE )
71
- .focused()
72
- .resizableColumn()
73
- }.enabledIf(myMiseDirEnvCb.selected)
74
- }
75
- },
76
- )
69
+ )
70
+ }.enabledIf(myMiseDirEnvCb.selected)
71
+ .layout(RowLayout .PARENT_GRID )
72
+ }
77
73
}
78
74
}
79
75
0 commit comments