From 32f232a80dc073094de4ab3fd5642c2d0b86827a Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Tue, 17 Dec 2024 10:09:42 +0800 Subject: [PATCH] Fix the issue where the `LoadingDecorator` constructor's non-null `icon` parameter is null. fix: #6246 --- .../ui/wordbook/WordBookWindowLoadingDecorator.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/wordbook/WordBookWindowLoadingDecorator.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/wordbook/WordBookWindowLoadingDecorator.kt index 2e596b1a5..02bd1171d 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/wordbook/WordBookWindowLoadingDecorator.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/wordbook/WordBookWindowLoadingDecorator.kt @@ -14,8 +14,15 @@ import javax.swing.JLabel import javax.swing.JPanel import javax.swing.SwingConstants -internal class WordBookWindowLoadingDecorator(content: JComponent, parent: Disposable) : - LoadingDecorator(content, parent, -1) { +internal class WordBookWindowLoadingDecorator( + content: JComponent, + parent: Disposable +) : LoadingDecorator( + content = content, + parent = parent, + startDelayMs = -1, + icon = AsyncProcessIcon.Big("Loading") +) { override fun customizeLoadingLayer(parent: JPanel, text: JLabel, icon: AsyncProcessIcon): NonOpaquePanel { parent.layout = GridBagLayout()