LLM-20426 Show dropdown icons for certain icons

Before this change we used to hide the dropdown icon for all popup action groups in CodeFloatingToolbar. However mockups for this feature require this dropdown to be present for the AI actions popup. This commit adds a ShowsDropdownIconInFloatingToolbar marker interface implementing which makes CodeFloatingToolbar show such icons.

GitOrigin-RevId: b25aed52ee236072ea818d5f31b2fe71eb362c1e
This commit is contained in:
Kirill Alekhnovich
2025-11-05 20:13:31 +00:00
committed by intellij-monorepo-bot
parent 22e1f6a54b
commit 804c2ad210
2 changed files with 11 additions and 1 deletions
@@ -194,7 +194,9 @@ class CodeFloatingToolbar(
val hint = super.createHint()
val buttons = UIUtil.findComponentsOfType(hint.component, ActionButton::class.java)
buttons.forEach { button ->
button.presentation.putClientProperty(ActionUtil.HIDE_DROPDOWN_ICON, true)
if (button.action !is ShowsDropdownIconInFloatingToolbar) {
button.presentation.putClientProperty(ActionUtil.HIDE_DROPDOWN_ICON, true)
}
showMenuPopupOnMouseHover(button)
}
return hint
@@ -0,0 +1,8 @@
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.ui.codeFloatingToolbar
/**
* By default [CodeFloatingToolbar] hides dropdown icons of popup action groups it contains.
* Implement this interface to show dropdown icons for your popup action group.
*/
interface ShowsDropdownIconInFloatingToolbar