mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
UI DSL: remove verticalPanel to simplify implementation and DSL
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
package com.intellij.ui.layout
|
||||
|
||||
import com.intellij.ui.components.Panel
|
||||
import com.intellij.ui.layout.LCFlags.*
|
||||
import javax.swing.JPanel
|
||||
|
||||
/**
|
||||
@@ -23,8 +22,4 @@ inline fun panel(vararg constraints: LCFlags, title: String? = null, init: Layou
|
||||
val panel = Panel(title, layout = null)
|
||||
builder.builder.build(panel, constraints)
|
||||
return panel
|
||||
}
|
||||
|
||||
inline fun verticalPanel(init: Row.() -> Unit) = panel(noGrid, flowY, fillX) {
|
||||
row(init = init)
|
||||
}
|
||||
@@ -49,9 +49,9 @@ internal class IcsConfigurableUi : ConfigurableUi<IcsSettings>, Disposable {
|
||||
saveSettings(settings, icsManager.settingsFile)
|
||||
}
|
||||
|
||||
override fun getComponent() = verticalPanel {
|
||||
editors.get(0).component()
|
||||
autoSync(comment = "Use VCS -> Sync Settings to sync when you want")
|
||||
panel("Read-only Sources", editors.get(1).component)
|
||||
override fun getComponent() = panel {
|
||||
row { editors.get(0).component() }
|
||||
row { autoSync(comment = "Use VCS -> Sync Settings to sync when you want") }
|
||||
row { panel("Read-only Sources", editors.get(1).component) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user