mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
New toolbar: limit search size
GitOrigin-RevId: 869dddced0d6e6962d9e50638ae17db4e824571d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
89a5a1d85e
commit
c1c97dde02
+1
-12
@@ -38,18 +38,7 @@ class NewToolbarBorderLayout : BorderLayout() {
|
||||
var left = insets.left
|
||||
var right = target.width - insets.right
|
||||
var c: Component?
|
||||
if (getLayoutComponent(NORTH).also { c = it } != null) {
|
||||
c!!.setSize(right - left, c!!.height)
|
||||
val d = c!!.preferredSize
|
||||
c!!.setBounds(left, top, right - left, d.height)
|
||||
top += d.height + vgap
|
||||
}
|
||||
if (getLayoutComponent(SOUTH).also { c = it } != null) {
|
||||
c!!.setSize(right - left, c!!.height)
|
||||
val d = c!!.preferredSize
|
||||
c!!.setBounds(left, bottom - d.height, right - left, d.height)
|
||||
bottom -= d.height + vgap
|
||||
}
|
||||
|
||||
if (getLayoutComponent(EAST).also { c = it } != null) {
|
||||
c!!.setSize(c!!.width, bottom - top)
|
||||
val d = c!!.preferredSize
|
||||
|
||||
+5
-1
@@ -93,13 +93,17 @@ class SearchEverywhereNewToolbarAction : SearchEverywhereAction(), AnActionListe
|
||||
override fun ancestorAdded(event: AncestorEvent?) {
|
||||
rootPane?.addComponentListener(object : ComponentAdapter() {
|
||||
override fun componentResized(e: ComponentEvent?) {
|
||||
checkIfEnoughSpace()
|
||||
shouldShow = true
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun getPreferredSize(): Dimension {
|
||||
return Dimension(super.getPreferredSize().width, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE.height)
|
||||
}
|
||||
|
||||
override fun updateToolTipText() {
|
||||
val shortcutText = getShortcut()
|
||||
val classesTabName = java.lang.String.join("/", getActionTitlePluralized())
|
||||
|
||||
Reference in New Issue
Block a user