summaryrefslogtreecommitdiff
path: root/project-wizard
diff options
context:
space:
mode:
authorIlya Kirillov <ilya.kirillov@jetbrains.com>2020-10-01 16:04:06 +0300
committerkotlin-ide-monorepo-bot <kotlin-ide-monorepo-bot-no-reply@jetbrains.com>2020-10-19 11:29:00 +0000
commit33b068243a57b24e6891cdd8daa1813eb4a7af6b (patch)
treef0dbeacdfd30e3e8e67349ff4728f8e9ccd9684d /project-wizard
parentd1fe016887caa84ac5ab320592796f024835a7f2 (diff)
downloadintellij-kotlin-33b068243a57b24e6891cdd8daa1813eb4a7af6b.tar.gz
Wizard: make project templates list scrollable
Original commit: 2a5679e0c60cdd7cea6f8a110a291127f0d638c9 GitOrigin-RevId: cfc85eb82ef073b4c0d6f6204e5666c8369bbf4f
Diffstat (limited to 'project-wizard')
-rw-r--r--project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/FirstWizardStepComponent.kt5
-rw-r--r--project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/ProjectTemplateSettingComponent.kt5
2 files changed, 4 insertions, 6 deletions
diff --git a/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/FirstWizardStepComponent.kt b/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/FirstWizardStepComponent.kt
index 2583afca4ec1..67f04c426f49 100644
--- a/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/FirstWizardStepComponent.kt
+++ b/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/FirstWizardStepComponent.kt
@@ -77,7 +77,7 @@ class ProjectSettingsComponent(ideWizard: IdeWizard) : DynamicComponent(ideWizar
).asSubComponent()
override val component: JComponent by lazy(LazyThreadSafetyMode.NONE) {
- val panel = panel {
+ panel {
row {
nameAndLocationComponent.component(growX)
}
@@ -85,9 +85,6 @@ class ProjectSettingsComponent(ideWizard: IdeWizard) : DynamicComponent(ideWizar
buildSystemAdditionalSettingsComponent.component(growX)
}
}.addBorder(JBUI.Borders.emptyRight(UIConstants.PADDING))
- ScrollPaneFactory.createScrollPane(panel, true).apply {
- viewport.background = JBColor.PanelBackground
- }
}
override fun onValueUpdated(reference: SettingReference<*, *>?) {
diff --git a/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/ProjectTemplateSettingComponent.kt b/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/ProjectTemplateSettingComponent.kt
index 9bf383882b33..1d1925819517 100644
--- a/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/ProjectTemplateSettingComponent.kt
+++ b/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/firstStep/ProjectTemplateSettingComponent.kt
@@ -47,10 +47,10 @@ class ProjectTemplateSettingComponent(
override val alignment: TitleComponentAlignment
get() = TitleComponentAlignment.AlignFormTopWithPadding(4)
- private val borderedPanel = list.addBorder(BorderFactory.createLineBorder(JBColor.border()))
+ private val scrollPane = ScrollPaneFactory.createScrollPane(list)
override val component: JComponent = borderPanel {
- addToCenter(borderPanel { addToCenter(list) }.addBorder(JBUI.Borders.empty(0,/*left*/ 3, 0, /*right*/ 3)))
+ addToCenter(borderPanel { addToCenter(scrollPane) }.addBorder(JBUI.Borders.empty(0,/*left*/ 3, 0, /*right*/ 3)))
addToBottom(templateDescriptionComponent.component.addBorder(JBUI.Borders.empty(/*top*/8,/*left*/ 3, 0, 0)))
}
@@ -93,6 +93,7 @@ private val ProjectTemplate.icon: Icon
MultiplatformMobileApplicationProjectTemplate -> KotlinIcons.Wizard.MULTIPLATFORM_MOBILE
MultiplatformMobileLibraryProjectTemplate -> KotlinIcons.Wizard.MULTIPLATFORM_MOBILE_LIBRARY
NodeJsApplicationProjectTemplate -> KotlinIcons.Wizard.NODE_JS
+ ComposeDesktopApplicationProjectTemplate -> KotlinIcons.Wizard.COMPOSE
}
class TemplateDescriptionComponent : Component() {