mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-175180 Some tool window buttons is grayed out on tool window stripe in Dark theme
GitOrigin-RevId: a7ace0e9c2d09dfd92769b969271d96d08f1c2d3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9e2c68a917
commit
c1a34ca4a4
@@ -81,7 +81,7 @@ fun loadIconCustomVersionOrScale(icon: ScalableIcon, size: Int): Icon {
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun loadIconCustomVersionOrScale(icon: CachedImageIcon, size: Int, isDark: Boolean? = null): Icon {
|
||||
fun loadIconCustomVersionOrScale(icon: CachedImageIcon, size: Int, isDark: Boolean? = null, isDarkForScale: Boolean? = null): Icon {
|
||||
if (icon.iconWidth == JBUIScale.scale(size)) {
|
||||
return if (isDark == null) icon else icon.getDarkIcon(isDark)
|
||||
}
|
||||
@@ -89,5 +89,5 @@ fun loadIconCustomVersionOrScale(icon: CachedImageIcon, size: Int, isDark: Boole
|
||||
loadIconCustomVersion(icon = icon, width = size, height = size, isDark = isDark)?.let {
|
||||
return it
|
||||
}
|
||||
return icon.scale(scale = (JBUIScale.scale(1.0f) * size) / icon.getRawIconWidth(), isDark = isDark ?: false)
|
||||
return icon.scale(scale = (JBUIScale.scale(1.0f) * size) / icon.getRawIconWidth(), isDark = isDarkForScale)
|
||||
}
|
||||
+2
-1
@@ -93,7 +93,8 @@ open class HeaderToolbarButtonLook(
|
||||
}
|
||||
|
||||
if (icon is CachedImageIcon) {
|
||||
return loadIconCustomVersionOrScale(icon = icon, size = iconSize, isDark = isDarkHeader().takeIf { it })
|
||||
val darkHeader = isDarkHeader()
|
||||
return loadIconCustomVersionOrScale(icon = icon, size = iconSize, isDark = darkHeader.takeIf { it }, isDarkForScale = darkHeader)
|
||||
}
|
||||
|
||||
return if (icon is ScalableIcon) loadIconCustomVersionOrScale(icon = icon, size = iconSize) else icon
|
||||
|
||||
@@ -170,7 +170,7 @@ public final class NotificationBalloonActionProvider implements BalloonImpl.Acti
|
||||
}
|
||||
}
|
||||
if (ColorUtil.isDark(JBColor.namedColor("MainToolbar.background")) && JBColor.isBright() && icon instanceof CachedImageIcon) {
|
||||
icon = CustomIconUtilKt.loadIconCustomVersionOrScale((CachedImageIcon)icon, 16, true);
|
||||
icon = CustomIconUtilKt.loadIconCustomVersionOrScale((CachedImageIcon)icon, 16, true, true);
|
||||
}
|
||||
}
|
||||
return icon;
|
||||
|
||||
Reference in New Issue
Block a user