From 356dc2ad427ba393eb146ca4c92a5cd8dec8e77e Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Tue, 10 Mar 2020 16:37:24 +0300 Subject: [PATCH] Wizard: do not show double label on checkbox setting --- .../wizard/ui/components/CheckboxComponent.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/CheckboxComponent.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/CheckboxComponent.kt index b9299181875..543cf744b21 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/CheckboxComponent.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/CheckboxComponent.kt @@ -1,8 +1,10 @@ package org.jetbrains.kotlin.tools.projectWizard.wizard.ui.components import com.intellij.ui.components.JBCheckBox +import com.intellij.util.ui.UIUtil import org.jetbrains.kotlin.tools.projectWizard.core.Context import org.jetbrains.kotlin.tools.projectWizard.core.entity.SettingValidator +import java.awt.Font class CheckboxComponent( context: Context, @@ -12,11 +14,12 @@ class CheckboxComponent( onValueUpdate: (Boolean) -> Unit = {} ) : UIComponent( context, - labelText, - validator, - onValueUpdate + labelText = null, + validator = validator, + onValueUpdate = onValueUpdate ) { override val uiComponent: JBCheckBox = JBCheckBox(labelText, initialValue ?: false).apply { + font = UIUtil.getButtonFont() addChangeListener { fireValueUpdated(this@apply.isSelected) }