Skip to content

Commit 577f22b

Browse files
committed
调整一点样式
1 parent 5df10d3 commit 577f22b

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

src/main/kotlin/org/tabooproject/intellij/component/AddDeleteModuleListPanel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import org.tabooproject.intellij.step.Module
77
class AddDeleteModuleListPanel(
88
title: String,
99
initial: List<Module>,
10+
defaultHeight: Int = 175
1011
) : AddDeleteListPanel<Module>(title, initial) {
1112

1213
init {
1314
preferredSize = preferredSize.apply {
14-
width += 250
15-
height += 175
15+
width += 300
16+
height += defaultHeight
1617
}
1718
}
1819

src/main/kotlin/org/tabooproject/intellij/component/AddDeleteStringListPanel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ class AddDeleteStringListPanel(
88
title: String,
99
initial: List<String>,
1010
private val dialogMessage: String,
11-
private val dialogTitle: String
11+
private val dialogTitle: String,
12+
defaultHeight: Int = 100,
1213
) : AddDeleteListPanel<String>(title, initial) {
1314

1415
init {
1516
preferredSize = preferredSize.apply {
1617
width += 200
17-
height += 100
18+
height += defaultHeight
1819
}
1920
}
2021

src/main/kotlin/org/tabooproject/intellij/step/ConfigurationPropertiesStep.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,25 @@ class ConfigurationPropertiesStep : ModuleWizardStep() {
7272
textField()
7373
.apply {
7474
component.text = property.name
75+
component.columns = 30
7576
}.onChanged { property.name = it.text }
7677
}
7778
row("Plugin main class:") {
7879
textField()
7980
.apply {
8081
component.text = property.mainClass
82+
component.columns = 30
8183
}.onChanged { property.mainClass = it.text }
8284
}
8385
row("Plugin version:") {
8486
textField()
8587
.apply {
8688
component.text = property.version
89+
component.columns = 30
8790
}.onChanged { property.version = it.text }
8891
}
92+
// 不知道怎么做间隔
93+
row { text("") }
8994
row {
9095
cell(modulePanel)
9196
}

src/main/kotlin/org/tabooproject/intellij/step/OptionalPropertiesStep.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ data class OptionalProperty(
1616

1717
class OptionalPropertiesStep : ModuleWizardStep() {
1818

19-
private val authorsPanel = AddDeleteStringListPanel("Authors", property.authors, "Author", "Add Author")
20-
private val dependsPanel = AddDeleteStringListPanel("Depends", property.depends, "Depend", "Add Depend")
21-
private val softDependsPanel = AddDeleteStringListPanel("Soft depends", property.softDepends, "Soft Depend", "Add Soft Depend")
19+
private val authorsPanel = AddDeleteStringListPanel("Authors", property.authors, "Author", "Add Author", 10)
20+
private val dependsPanel = AddDeleteStringListPanel("Depends", property.depends, "Depend", "Add Depend", 10)
21+
private val softDependsPanel = AddDeleteStringListPanel("Soft depends", property.softDepends, "Soft Depend", "Add Soft Depend", 10)
2222

2323
companion object {
2424

@@ -38,6 +38,7 @@ class OptionalPropertiesStep : ModuleWizardStep() {
3838
textField()
3939
.apply {
4040
component.text = property.description
41+
component.columns = 30
4142
}.onChanged { property.description = it.text }
4243
}
4344
row("Author:") {
@@ -47,6 +48,7 @@ class OptionalPropertiesStep : ModuleWizardStep() {
4748
textField()
4849
.apply {
4950
component.text = property.website
51+
component.columns = 30
5052
}.onChanged { property.website = it.text }
5153
}
5254
row("Depends:") {

0 commit comments

Comments
 (0)