ui: remove double indent from UI DSL panels

GitOrigin-RevId: 0fad662a7efc7c4b659f60298b7f1f77024d8713
This commit is contained in:
Aleksey Pivovarov
2019-12-20 14:44:33 +00:00
committed by intellij-monorepo-bot
parent 367479012c
commit e120d4fb57
4 changed files with 103 additions and 127 deletions
@@ -71,39 +71,29 @@ class EditorCheckBoxConfigurable : BoundConfigurable(""), SearchableConfigurable
override fun createPanel(): DialogPanel {
return panel {
row {
titledRow(message("group.advanced.mouse.usages")) {
row { checkBox(honorCamelHumpsWhenSelectingByClicking) }
row { checkBox(enableWheelFontChange) }
row { checkBox(enableDnD) }
}
titledRow(message("group.advanced.mouse.usages")) {
row { checkBox(honorCamelHumpsWhenSelectingByClicking) }
row { checkBox(enableWheelFontChange) }
row { checkBox(enableDnD) }
}
row {
titledRow(message("group.virtual.space")) {
row { checkBox(virtualSpace) }
row { checkBox(caretInsideTabs) }
row { checkBox(virtualPageAtBottom) }
}
titledRow(message("group.virtual.space")) {
row { checkBox(virtualSpace) }
row { checkBox(caretInsideTabs) }
row { checkBox(virtualPageAtBottom) }
}
row {
titledRow(message("group.brace.highlighting")) {
row { checkBox(highlightBraces) }
row { checkBox(highlightScope) }
row { checkBox(highlightIdentifierUnderCaret) }
}
titledRow(message("group.brace.highlighting")) {
row { checkBox(highlightBraces) }
row { checkBox(highlightScope) }
row { checkBox(highlightIdentifierUnderCaret) }
}
row {
titledRow("Formatting") {
row { checkBox(showNotificationAfterReformatCodeCheckBox) }
row { checkBox(myShowNotificationAfterOptimizeImportsCheckBox) }
}
titledRow("Formatting") {
row { checkBox(showNotificationAfterReformatCodeCheckBox) }
row { checkBox(myShowNotificationAfterOptimizeImportsCheckBox) }
}
row {
titledRow("Refactorings") {
row { checkBox(renameLocalVariablesInplace) }
row { checkBox(preselectCheckBox) }
row { checkBox(showInlineDialogForCheckBox) }
}
titledRow("Refactorings") {
row { checkBox(renameLocalVariablesInplace) }
row { checkBox(preselectCheckBox) }
row { checkBox(showInlineDialogForCheckBox) }
}
}
}
@@ -111,18 +111,16 @@ class EditorSmartKeysConfigurable : Configurable.WithEpDependencies, BoundCompos
row {
checkBox(myCbTabExistsBracketsAndQuotes)
}
row {
titledRow("Enter") {
titledRow("Enter") {
row {
checkBox(myCbSmartIndentOnEnter)
}
row {
checkBox(myCbInsertPairCurlyBraceOnEnter)
}
if (hasAnyDocAwareCommenters()) {
row {
checkBox(myCbSmartIndentOnEnter)
}
row {
checkBox(myCbInsertPairCurlyBraceOnEnter)
}
if (hasAnyDocAwareCommenters()) {
row {
checkBox(myCbInsertJavadocStubOnEnter)
}
checkBox(myCbInsertJavadocStubOnEnter)
}
}
}
@@ -58,76 +58,68 @@ class GeneralSettingsConfigurable: BoundCompositeConfigurable<SearchableConfigur
val projectConceptName = IdeUICustomization.getInstance().projectConceptName
return panel {
row {
titledRow("Startup/Shutdown") {
row {
checkBox(myChkReopenLastProject)
}
row {
checkBox(myConfirmExit)
}
titledRow("Startup/Shutdown") {
row {
checkBox(myChkReopenLastProject)
}
row {
checkBox(myConfirmExit)
}
if (PlatformUtils.isDataGrip()) {
row {
checkBox(myShowWelcomeScreen)
}
if (PlatformUtils.isDataGrip()) {
row {
checkBox(myShowWelcomeScreen)
}
}
}
row {
titledRow(IdeBundle.message("border.title.project.opening", projectConceptName.capitalize())) {
row("Default directory:") {
textFieldWithBrowseButton(model::getDefaultProjectDirectory, model::setDefaultProjectDirectory,
fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor()
.also { it.putUserData(PathChooserDialog.PREFER_LAST_OVER_EXPLICIT, false) },
growPolicy = GrowPolicy.MEDIUM_TEXT)
.comment("This directory is preselected in \"Open...\" and \"New | Project...\" dialogs.", 80)
titledRow(IdeBundle.message("border.title.project.opening", projectConceptName.capitalize())) {
row("Default directory:") {
textFieldWithBrowseButton(model::getDefaultProjectDirectory, model::setDefaultProjectDirectory,
fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor()
.also { it.putUserData(PathChooserDialog.PREFER_LAST_OVER_EXPLICIT, false) },
growPolicy = GrowPolicy.MEDIUM_TEXT)
.comment("This directory is preselected in \"Open...\" and \"New | Project...\" dialogs.", 80)
}
buttonGroup(model::getConfirmOpenNewProject, model::setConfirmOpenNewProject) {
row {
radioButton(IdeBundle.message("radio.button.open.project.in.the.new.window", projectConceptName), GeneralSettings.OPEN_PROJECT_NEW_WINDOW)
}
buttonGroup(model::getConfirmOpenNewProject, model::setConfirmOpenNewProject) {
row {
radioButton(IdeBundle.message("radio.button.open.project.in.the.new.window", projectConceptName), GeneralSettings.OPEN_PROJECT_NEW_WINDOW)
}
row {
radioButton(IdeBundle.message("radio.button.open.project.in.the.same.window", projectConceptName), GeneralSettings.OPEN_PROJECT_SAME_WINDOW)
}
row {
radioButton(IdeBundle.message("radio.button.confirm.window.to.open.project.in", projectConceptName), GeneralSettings.OPEN_PROJECT_ASK)
}
row {
radioButton(IdeBundle.message("radio.button.open.project.in.the.same.window", projectConceptName), GeneralSettings.OPEN_PROJECT_SAME_WINDOW)
}
row {
radioButton(IdeBundle.message("radio.button.confirm.window.to.open.project.in", projectConceptName), GeneralSettings.OPEN_PROJECT_ASK)
}
}
}
row {
titledRow("Synchronization") {
row {
checkBox(myChkSyncOnFrameActivation)
}
row {
checkBox(myChkSaveOnFrameDeactivation)
}
row {
cell(isFullWidth = true) {
val autoSaveCheckbox = checkBox(myChkAutoSaveIfInactive)
intTextField(model::getInactiveTimeout, model::setInactiveTimeout, columns = 4).enableIf(autoSaveCheckbox.selected)
label(IdeBundle.message("label.inactive.timeout.sec"))
}
}
row {
checkBox(myChkUseSafeWrite)
titledRow("Synchronization") {
row {
checkBox(myChkSyncOnFrameActivation)
}
row {
checkBox(myChkSaveOnFrameDeactivation)
}
row {
cell(isFullWidth = true) {
val autoSaveCheckbox = checkBox(myChkAutoSaveIfInactive)
intTextField(model::getInactiveTimeout, model::setInactiveTimeout, columns = 4).enableIf(autoSaveCheckbox.selected)
label(IdeBundle.message("label.inactive.timeout.sec"))
}
}
row {
checkBox(myChkUseSafeWrite)
}
}
row {
titledRow(IdeBundle.message("group.settings.process.tab.close")) {
buttonGroup(model::getProcessCloseConfirmation, model::setProcessCloseConfirmation) {
row {
radioButton(IdeBundle.message("radio.process.close.terminate"), GeneralSettings.ProcessCloseConfirmation.TERMINATE)
}
row {
radioButton(IdeBundle.message("radio.process.close.disaconnect"), GeneralSettings.ProcessCloseConfirmation.DISCONNECT)
}
row {
radioButton(IdeBundle.message("radio.process.close.ask"), GeneralSettings.ProcessCloseConfirmation.ASK)
}
titledRow(IdeBundle.message("group.settings.process.tab.close")) {
buttonGroup(model::getProcessCloseConfirmation, model::setProcessCloseConfirmation) {
row {
radioButton(IdeBundle.message("radio.process.close.terminate"), GeneralSettings.ProcessCloseConfirmation.TERMINATE)
}
row {
radioButton(IdeBundle.message("radio.process.close.disaconnect"), GeneralSettings.ProcessCloseConfirmation.DISCONNECT)
}
row {
radioButton(IdeBundle.message("radio.process.close.ask"), GeneralSettings.ProcessCloseConfirmation.ASK)
}
}
}
@@ -50,36 +50,32 @@ private val webEditorOptionDescriptors = listOf(
internal class WebSmartKeysConfigurable(val model: WebEditorOptions) : BoundCompositeConfigurable<UnnamedConfigurable>("HTML/CSS"), ConfigurableWithOptionDescriptors {
override fun createPanel(): DialogPanel {
return panel {
row {
titledRow(XmlBundle.message("xml.editor.options.misc.title")) {
row {
checkBox(myAutomaticallyInsertClosingTagCheckBox)
}
row {
checkBox(myAutomaticallyInsertRequiredAttributesCheckBox)
}
row {
checkBox(myAutomaticallyInsertRequiredSubTagsCheckBox)
}
row {
checkBox(myAutomaticallyStartAttributeAfterCheckBox)
}
row {
checkBox(myAddQuotasForAttributeValue)
}
row {
checkBox(myAutoCloseTagCheckBox)
}
row {
checkBox(mySyncTagEditing)
}
titledRow(XmlBundle.message("xml.editor.options.misc.title")) {
row {
checkBox(myAutomaticallyInsertClosingTagCheckBox)
}
row {
checkBox(myAutomaticallyInsertRequiredAttributesCheckBox)
}
row {
checkBox(myAutomaticallyInsertRequiredSubTagsCheckBox)
}
row {
checkBox(myAutomaticallyStartAttributeAfterCheckBox)
}
row {
checkBox(myAddQuotasForAttributeValue)
}
row {
checkBox(myAutoCloseTagCheckBox)
}
row {
checkBox(mySyncTagEditing)
}
}
row {
titledRow("CSS") {
row {
checkBox(mySelectWholeCssIdentifierOnDoubleClick)
}
titledRow("CSS") {
row {
checkBox(mySelectWholeCssIdentifierOnDoubleClick)
}
}
for (configurable in configurables) {