diff --git a/platform/platform-impl/src/com/intellij/ui/layout/flags.kt b/platform/platform-impl/src/com/intellij/ui/layout/flags.kt index d42d5b062d99..cb9340365d52 100644 --- a/platform/platform-impl/src/com/intellij/ui/layout/flags.kt +++ b/platform/platform-impl/src/com/intellij/ui/layout/flags.kt @@ -26,12 +26,6 @@ enum class LCFlags { */ fill, fillX, fillY, - /** - * This option allows to toggle default state (true) for layout constraints that we use to better alignment on macOS - * where (text fields, checkboxes, buttons and so on) have focus ring that drawn outside of component border. - * In case ones mixes several panels with complex layout inside visual padding may cause truncated focus rings. - */ - noVisualPadding, debug } diff --git a/platform/platform-impl/src/com/intellij/ui/layout/migLayout/MigLayoutBuilder.kt b/platform/platform-impl/src/com/intellij/ui/layout/migLayout/MigLayoutBuilder.kt index 79ca7ea122f1..c997df5c9c1e 100644 --- a/platform/platform-impl/src/com/intellij/ui/layout/migLayout/MigLayoutBuilder.kt +++ b/platform/platform-impl/src/com/intellij/ui/layout/migLayout/MigLayoutBuilder.kt @@ -115,6 +115,13 @@ internal class MigLayoutBuilder(val spacing: SpacingConfiguration) : LayoutBuild override fun build(container: Container, layoutConstraints: Array) { val lc = createLayoutConstraints() lc.gridGapY = gapToBoundSize(spacing.verticalGap, false) + if (layoutConstraints.isEmpty()) { + lc.fillX() + // not fillY because it leads to enormously large cells - we use cc `push` in addition to cc `grow` as a more robust and easy solution + } + else { + lc.apply(layoutConstraints) + } /** * On macOS input fields (text fields, checkboxes, buttons and so on) have focus ring that drawn outside of component border. @@ -133,14 +140,6 @@ internal class MigLayoutBuilder(val spacing: SpacingConfiguration) : LayoutBuild // if 3, invisible component will be disregarded completely and it means that if it is last component, it's "wrap" constraint will be not taken in account lc.hideMode = 2 - if (layoutConstraints.isEmpty()) { - lc.fillX() - // not fillY because it leads to enormously large cells - we use cc `push` in addition to cc `grow` as a more robust and easy solution - } - else { - lc.apply(layoutConstraints) - } - val rowConstraints = AC() (container as JComponent).putClientProperty(IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY, false) var isLayoutInsetsAdjusted = false @@ -309,7 +308,7 @@ private fun LC.apply(flags: Array): LC { LCFlags.fill -> fill() LCFlags.fillX -> isFillX = true LCFlags.fillY -> isFillY = true - LCFlags.noVisualPadding -> isVisualPadding = false + LCFlags.debug -> debug() } } diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyHotSwapConfigurable.kt b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyHotSwapConfigurable.kt index efeb6a8e69ce..e6e1e91b3ab3 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyHotSwapConfigurable.kt +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyHotSwapConfigurable.kt @@ -16,7 +16,7 @@ class GroovyHotSwapConfigurable( helpTopic = "reference.idesettings.debugger.groovy" ) { - override fun createPanel(): DialogPanel = panel(LCFlags.noVisualPadding) { + override fun createPanel(): DialogPanel = panel { row { checkBox(CheckboxDescriptor( name = GroovyBundle.message("configurable.hotswap.checkbox"),