mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui] IJPL-215581 Light Islands: 'Write Thread' widget has black background
GitOrigin-RevId: b15f8a29e2a88c284865707ec4e3927dfaa094c8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d1a02e20df
commit
ad6d52df3b
+16
@@ -13,10 +13,12 @@ import com.intellij.openapi.wm.StatusBar
|
||||
import com.intellij.openapi.wm.StatusBarWidget
|
||||
import com.intellij.openapi.wm.StatusBarWidgetFactory
|
||||
import com.intellij.platform.ide.CoreUiCoroutineScopeHolder
|
||||
import com.intellij.ui.ExperimentalUI
|
||||
import com.intellij.ui.JBColor
|
||||
import com.intellij.ui.UIBundle
|
||||
import com.intellij.util.ThreeState
|
||||
import com.intellij.util.cancelOnDispose
|
||||
import com.intellij.util.ui.JBUI
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -94,6 +96,16 @@ private class WriteThreadWidget : CustomStatusBarWidget {
|
||||
override fun ID(): String = ID
|
||||
|
||||
private inner class MyComponent : JPanel() {
|
||||
|
||||
init {
|
||||
if (ExperimentalUI.isNewUI()) {
|
||||
isOpaque = false
|
||||
|
||||
// Don't allow hover be inside the widget
|
||||
border = JBUI.Borders.empty()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getPreferredSize(): Dimension = WIDGET_SIZE
|
||||
|
||||
override fun getMinimumSize(): Dimension = WIDGET_SIZE
|
||||
@@ -106,6 +118,10 @@ private class WriteThreadWidget : CustomStatusBarWidget {
|
||||
return
|
||||
}
|
||||
|
||||
if (ExperimentalUI.isNewUI()) {
|
||||
g.translate((width - WIDGET_SIZE.width) / 2, (height - WIDGET_SIZE.height) / 2)
|
||||
}
|
||||
|
||||
for ((xOffset, stats) in statsDeque.withIndex()) {
|
||||
g.color = JBColor.GRAY
|
||||
g.fillRect(xOffset, 0, 1, WIDGET_SIZE.height)
|
||||
|
||||
Reference in New Issue
Block a user