Browse Source

Set icon on EDT (#3452)

pull/3456/head
Alexey Tsvetkov 1 year ago committed by GitHub
parent
commit
d9767c34a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      idea-plugin/src/main/kotlin/org/jetbrains/compose/desktop/ide/preview/PreviewToolWindow.kt

5
idea-plugin/src/main/kotlin/org/jetbrains/compose/desktop/ide/preview/PreviewToolWindow.kt

@ -4,6 +4,7 @@
*/
package org.jetbrains.compose.desktop.ide.preview
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.service
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
@ -18,7 +19,9 @@ class PreviewToolWindow : ToolWindowFactory, DumbAware {
isPreviewCompatible(project)
override fun init(toolWindow: ToolWindow) {
toolWindow.setIcon(PreviewIcons.COMPOSE)
ApplicationManager.getApplication().invokeLater {
toolWindow.setIcon(PreviewIcons.COMPOSE)
}
}
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {

Loading…
Cancel
Save