mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-299337 Tool window buttons: make it possible to move More icon
GitOrigin-RevId: 43b8b41b62605cf69bd75b3e79dc4e79e9bd39ac
This commit is contained in:
committed by
intellij-monorepo-bot
parent
45ff05b5f1
commit
555d12b0d2
@@ -82,7 +82,7 @@ class ToolWindowManagerStateImpl : ToolWindowManagerState {
|
||||
}
|
||||
element.addContent(recentState)
|
||||
}
|
||||
if (moreButton !== ToolWindowAnchor.LEFT) {
|
||||
if (moreButton != ToolWindowAnchor.LEFT) {
|
||||
element.addContent(Element(MORE_BUTTON_TAG).setAttribute("side", moreButton.toString()))
|
||||
}
|
||||
return element
|
||||
|
||||
@@ -63,8 +63,7 @@ internal class MoreSquareStripeButton(toolWindowToolbar: ToolWindowToolbar,
|
||||
}
|
||||
|
||||
override fun isAvailable(project: Project): Boolean {
|
||||
return super.isAvailable(project) && ToolWindowManagerEx.getInstanceEx(
|
||||
project).getMoreButtonSide() == side
|
||||
return super.isAvailable(project) && ToolWindowManagerEx.getInstanceEx(project).getMoreButtonSide() == side
|
||||
}
|
||||
|
||||
override fun checkSkipPressForEvent(e: MouseEvent) = e.button != MouseEvent.BUTTON1
|
||||
@@ -109,11 +108,7 @@ internal abstract class AbstractMoreSquareStripeButton(action: AnAction) : Abstr
|
||||
override fun update() {
|
||||
super.update()
|
||||
val project = dataContext.getData(CommonDataKeys.PROJECT)
|
||||
if (project == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val available = isAvailable(project)
|
||||
val available = project != null && isAvailable(project)
|
||||
|
||||
myPresentation.isEnabledAndVisible = available
|
||||
isEnabled = available
|
||||
|
||||
Reference in New Issue
Block a user