PY-82344 Fix promo border visible even if promo is hidden

(cherry picked from commit 63b1b4896c31a7beb61d1be70fd5e19550496982)

GitOrigin-RevId: 3c8b66f3443cc6e126c3fef1ce96fcd920cef355
This commit is contained in:
Daniil Kalinin
2025-11-25 08:57:54 +01:00
committed by intellij-monorepo-bot
parent a75939123a
commit f2bde37381

View File

@@ -35,7 +35,7 @@ internal class PyCommunityToUnifiedWelcomeScreenBanner : PyCommunityToUnifiedWel
private val mainBannerPanel = createMainPanel()
val container: Wrapper = Wrapper(mainBannerPanel).apply { isVisible = false }
val container: Wrapper = Wrapper().apply { isVisible = false }
override fun getPromotion(isEmptyState: Boolean): JComponent {
val service = service<PyCommunityToUnifiedPromoService>()
@@ -43,7 +43,8 @@ internal class PyCommunityToUnifiedWelcomeScreenBanner : PyCommunityToUnifiedWel
val shouldShowBanner = service.shouldShowWelcomeScreenBanner()
if (shouldShowBanner) {
withContext(Dispatchers.EDT) {
container.setContent(mainBannerPanel)
val wrapped = wrapIntoSvgBackgroundPanel(mainBannerPanel)
container.setContent(wrapped)
container.isVisible = true
PyCommunityUnifiedPromoFusCollector.WelcomeScreenBannerShown.log()
container.revalidate()
@@ -51,7 +52,7 @@ internal class PyCommunityToUnifiedWelcomeScreenBanner : PyCommunityToUnifiedWel
}
}
}
return wrapIntoSvgBackgroundPanel(container)
return container
}
override fun canCreatePromo(isEmptyState: Boolean): Boolean {