Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix toolkit connection dropdown getting hidden when panel width is small."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package software.aws.toolkits.jetbrains.core.explorer

import com.intellij.openapi.actionSystem.ActionToolbar

fun setToolbarLayout(toolbar: ActionToolbar) {
toolbar.layoutPolicy = ActionToolbar.NOWRAP_LAYOUT_POLICY
}
Comment on lines +3 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToolbarLayoutStrategy doesn't exist in 233, so it would be less overall work if we just aliased
ToolbarLayoutStrategy.NOWRAP_STRATEGY to be ActionToolbar.NOWRAP_LAYOUT_POLICY i n233

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package software.aws.toolkits.jetbrains.core.explorer

import com.intellij.openapi.actionSystem.ActionToolbar
import com.intellij.openapi.actionSystem.toolbarLayout.ToolbarLayoutStrategy

fun setToolbarLayout(toolbar: ActionToolbar) {
toolbar.layoutStrategy = ToolbarLayoutStrategy.NOWRAP_STRATEGY
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package software.aws.toolkits.jetbrains.core.explorer
import com.intellij.icons.AllIcons
import com.intellij.openapi.actionSystem.ActionManager
import com.intellij.openapi.actionSystem.ActionPlaces
import com.intellij.openapi.actionSystem.ActionToolbar
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.DefaultActionGroup
Expand Down Expand Up @@ -65,12 +64,11 @@ class AwsToolkitExplorerToolWindow(
val group = CredsComboBoxActionGroup(project)

toolbar = BorderLayoutPanel().apply {
addToCenter(
ActionManager.getInstance().createActionToolbar(ActionPlaces.TOOLBAR, group, true).apply {
layoutPolicy = ActionToolbar.AUTO_LAYOUT_POLICY
setTargetComponent(this@AwsToolkitExplorerToolWindow)
}.component
)
val actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.TOOLBAR, group, true).apply {
setTargetComponent(this@AwsToolkitExplorerToolWindow)
}
setToolbarLayout(actionToolbar)
addToCenter(actionToolbar.component)

val actionManager = ActionManager.getInstance()
val rightActionGroup = DefaultActionGroup(
Expand Down
Loading