diff --git a/CHANGELOG.md b/CHANGELOG.md index 17f8afe88..f8fb05522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [v2.8.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-04-07) + +- 修复了一些Bug + ## [v2.8.0](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.0) (2020-03-23) - 谷歌翻译新增拼写检查功能 diff --git a/README.md b/README.md index 0b1bdc8f0..c5dd02f4f 100644 --- a/README.md +++ b/README.md @@ -178,11 +178,9 @@ FAQ 更新日志 -------- -## [v2.8.0](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.0) (2020-03-23) +## [v2.8.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-04-07) -- 谷歌翻译新增拼写检查功能 -- 翻译与替换功能支持自动单词拆分 -- 单词本自动聚焦新增的单词 +- 修复了一些Bug [完整的更新历史记录](./CHANGELOG.md) diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/action/TranslateAction.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/action/TranslateAction.kt index 3cf87831b..d495a3976 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/action/TranslateAction.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/action/TranslateAction.kt @@ -66,11 +66,16 @@ open class TranslateAction(checkSelection: Boolean = false) : AutoSelectAction(c val balloon = TranslationUIManager.showBalloon(editor, text, tracker, Balloon.Position.below) if (highlighters.isNotEmpty()) { - Disposer.register(balloon, Disposable { + val disposable = Disposable { for (highlighter in highlighters) { highlightManager.removeSegmentHighlighter(editor, highlighter) } - }) + } + if (balloon.disposed) { + disposable.dispose() + } else { + Disposer.register(balloon, disposable) + } } } diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/ProcessComponent.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/ProcessComponent.kt index 0057372ee..e1efd2b1f 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/ProcessComponent.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/ProcessComponent.kt @@ -35,7 +35,7 @@ class ProcessComponent(text: String, insets: Insets = JBUI.emptyInsets()) : JPan init { isOpaque = false - layout = GridLayoutManager(1, 2, insets, JBUI.scale(5), 0) + layout = GridLayoutManager(1, 2, insets, JBUI.scale(10), 0) add(icon, GridConstraints().apply { column = 0 diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/SupportDialog.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/SupportDialog.kt index 303e1b467..a72e63fc8 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/SupportDialog.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/SupportDialog.kt @@ -62,8 +62,8 @@ class SupportDialog private constructor() : DialogWrapper(null) { 捐赠金额: 支付平台:支付宝/微信支付 支付宝用户名/微信用户名/单号(后5位):
- 您提供的名字、网站和捐赠总额将会被添加到Patrons/捐赠者列表中,列表将按捐赠总额列出前50名捐赠者。
邮箱地址:yii.guxing@gmail.com (点击发送邮件)
+ 您提供的名字、网站和捐赠总额将会被添加到Patrons/捐赠者列表中,列表将按捐赠总额列出前50名捐赠者。
感谢您的慷慨捐赠! """.trimIndent() JBPopupFactory.getInstance() diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/icon/ProcessIcon.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/icon/ProcessIcon.kt index 66579ed62..72d2cce42 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/icon/ProcessIcon.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/ui/icon/ProcessIcon.kt @@ -3,34 +3,14 @@ package cn.yiiguxing.plugin.translate.ui.icon import com.intellij.openapi.util.IconLoader import com.intellij.util.ui.AnimatedIcon -internal class ProcessIcon : AnimatedIcon("Querying Process", - ICONS, - STEP_PASSIVE, - CYCLE_LENGTH) { +internal class ProcessIcon : AnimatedIcon( + "Querying Process", ICONS, STEP_PASSIVE, CYCLE_LENGTH +) { companion object { - private const val CYCLE_LENGTH = 800 + private const val CYCLE_LENGTH = 400 - private val ICONS = arrayOf( - IconLoader.getIcon("/process/fs/step_1@2x.png"), - IconLoader.getIcon("/process/fs/step_2@2x.png"), - IconLoader.getIcon("/process/fs/step_3@2x.png"), - IconLoader.getIcon("/process/fs/step_4@2x.png"), - IconLoader.getIcon("/process/fs/step_5@2x.png"), - IconLoader.getIcon("/process/fs/step_6@2x.png"), - IconLoader.getIcon("/process/fs/step_7@2x.png"), - IconLoader.getIcon("/process/fs/step_8@2x.png"), - IconLoader.getIcon("/process/fs/step_9@2x.png"), - IconLoader.getIcon("/process/fs/step_10@2x.png"), - IconLoader.getIcon("/process/fs/step_11@2x.png"), - IconLoader.getIcon("/process/fs/step_12@2x.png"), - IconLoader.getIcon("/process/fs/step_13@2x.png"), - IconLoader.getIcon("/process/fs/step_14@2x.png"), - IconLoader.getIcon("/process/fs/step_15@2x.png"), - IconLoader.getIcon("/process/fs/step_16@2x.png"), - IconLoader.getIcon("/process/fs/step_17@2x.png"), - IconLoader.getIcon("/process/fs/step_18@2x.png") - ) + private val ICONS = Array(9) { IconLoader.getIcon("/icons/spinner/step_${it}.png") } - private val STEP_PASSIVE = IconLoader.getIcon("/process/fs/step_passive@2x.png") + private val STEP_PASSIVE = IconLoader.getIcon("/icons/spinner/step_passive.png") } } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 5433f2a2a..901914018 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -44,9 +44,7 @@ -
  • 谷歌翻译新增拼写检查功能
  • -
  • 翻译与替换功能支持自动单词拆分
  • -
  • 单词本自动聚焦新增的单词
  • +
  • 修复了一些Bug
  • Full Changelog History ]]>
    diff --git a/src/main/resources/icons/spinner/step_0.png b/src/main/resources/icons/spinner/step_0.png new file mode 100644 index 000000000..3e36bbe81 Binary files /dev/null and b/src/main/resources/icons/spinner/step_0.png differ diff --git a/src/main/resources/icons/spinner/step_0.svg b/src/main/resources/icons/spinner/step_0.svg new file mode 100644 index 000000000..d7fe57f60 --- /dev/null +++ b/src/main/resources/icons/spinner/step_0.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/main/resources/icons/spinner/step_0@2x.png b/src/main/resources/icons/spinner/step_0@2x.png new file mode 100644 index 000000000..3a4e68e57 Binary files /dev/null and b/src/main/resources/icons/spinner/step_0@2x.png differ diff --git a/src/main/resources/icons/spinner/step_0@2x_dark.png b/src/main/resources/icons/spinner/step_0@2x_dark.png new file mode 100644 index 000000000..3b2899a4c Binary files /dev/null and b/src/main/resources/icons/spinner/step_0@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_0_dark.png b/src/main/resources/icons/spinner/step_0_dark.png new file mode 100644 index 000000000..2bdb172a9 Binary files /dev/null and b/src/main/resources/icons/spinner/step_0_dark.png differ diff --git a/src/main/resources/icons/spinner/step_0_dark.svg b/src/main/resources/icons/spinner/step_0_dark.svg new file mode 100644 index 000000000..8e104bdac --- /dev/null +++ b/src/main/resources/icons/spinner/step_0_dark.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/main/resources/icons/spinner/step_1.png b/src/main/resources/icons/spinner/step_1.png new file mode 100644 index 000000000..7703f74d2 Binary files /dev/null and b/src/main/resources/icons/spinner/step_1.png differ diff --git a/src/main/resources/icons/spinner/step_1.svg b/src/main/resources/icons/spinner/step_1.svg new file mode 100644 index 000000000..7104790ea --- /dev/null +++ b/src/main/resources/icons/spinner/step_1.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_1@2x.png b/src/main/resources/icons/spinner/step_1@2x.png new file mode 100644 index 000000000..f0978f62c Binary files /dev/null and b/src/main/resources/icons/spinner/step_1@2x.png differ diff --git a/src/main/resources/icons/spinner/step_1@2x_dark.png b/src/main/resources/icons/spinner/step_1@2x_dark.png new file mode 100644 index 000000000..2c331465f Binary files /dev/null and b/src/main/resources/icons/spinner/step_1@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_1_dark.png b/src/main/resources/icons/spinner/step_1_dark.png new file mode 100644 index 000000000..4c9c4d38c Binary files /dev/null and b/src/main/resources/icons/spinner/step_1_dark.png differ diff --git a/src/main/resources/icons/spinner/step_1_dark.svg b/src/main/resources/icons/spinner/step_1_dark.svg new file mode 100644 index 000000000..f4a9de206 --- /dev/null +++ b/src/main/resources/icons/spinner/step_1_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_2.png b/src/main/resources/icons/spinner/step_2.png new file mode 100644 index 000000000..c74ff005f Binary files /dev/null and b/src/main/resources/icons/spinner/step_2.png differ diff --git a/src/main/resources/icons/spinner/step_2.svg b/src/main/resources/icons/spinner/step_2.svg new file mode 100644 index 000000000..efa184791 --- /dev/null +++ b/src/main/resources/icons/spinner/step_2.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_2@2x.png b/src/main/resources/icons/spinner/step_2@2x.png new file mode 100644 index 000000000..093e02379 Binary files /dev/null and b/src/main/resources/icons/spinner/step_2@2x.png differ diff --git a/src/main/resources/icons/spinner/step_2@2x_dark.png b/src/main/resources/icons/spinner/step_2@2x_dark.png new file mode 100644 index 000000000..48fd26bea Binary files /dev/null and b/src/main/resources/icons/spinner/step_2@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_2_dark.png b/src/main/resources/icons/spinner/step_2_dark.png new file mode 100644 index 000000000..3c5a28202 Binary files /dev/null and b/src/main/resources/icons/spinner/step_2_dark.png differ diff --git a/src/main/resources/icons/spinner/step_2_dark.svg b/src/main/resources/icons/spinner/step_2_dark.svg new file mode 100644 index 000000000..b04d4b702 --- /dev/null +++ b/src/main/resources/icons/spinner/step_2_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_3.png b/src/main/resources/icons/spinner/step_3.png new file mode 100644 index 000000000..ee5530dcc Binary files /dev/null and b/src/main/resources/icons/spinner/step_3.png differ diff --git a/src/main/resources/icons/spinner/step_3.svg b/src/main/resources/icons/spinner/step_3.svg new file mode 100644 index 000000000..e57d492fb --- /dev/null +++ b/src/main/resources/icons/spinner/step_3.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_3@2x.png b/src/main/resources/icons/spinner/step_3@2x.png new file mode 100644 index 000000000..e2ce98882 Binary files /dev/null and b/src/main/resources/icons/spinner/step_3@2x.png differ diff --git a/src/main/resources/icons/spinner/step_3@2x_dark.png b/src/main/resources/icons/spinner/step_3@2x_dark.png new file mode 100644 index 000000000..62df4420f Binary files /dev/null and b/src/main/resources/icons/spinner/step_3@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_3_dark.png b/src/main/resources/icons/spinner/step_3_dark.png new file mode 100644 index 000000000..4d68241ca Binary files /dev/null and b/src/main/resources/icons/spinner/step_3_dark.png differ diff --git a/src/main/resources/icons/spinner/step_3_dark.svg b/src/main/resources/icons/spinner/step_3_dark.svg new file mode 100644 index 000000000..5d3040782 --- /dev/null +++ b/src/main/resources/icons/spinner/step_3_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_4.png b/src/main/resources/icons/spinner/step_4.png new file mode 100644 index 000000000..391b890f6 Binary files /dev/null and b/src/main/resources/icons/spinner/step_4.png differ diff --git a/src/main/resources/icons/spinner/step_4.svg b/src/main/resources/icons/spinner/step_4.svg new file mode 100644 index 000000000..f83794b53 --- /dev/null +++ b/src/main/resources/icons/spinner/step_4.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_4@2x.png b/src/main/resources/icons/spinner/step_4@2x.png new file mode 100644 index 000000000..296781404 Binary files /dev/null and b/src/main/resources/icons/spinner/step_4@2x.png differ diff --git a/src/main/resources/icons/spinner/step_4@2x_dark.png b/src/main/resources/icons/spinner/step_4@2x_dark.png new file mode 100644 index 000000000..19f0fca31 Binary files /dev/null and b/src/main/resources/icons/spinner/step_4@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_4_dark.png b/src/main/resources/icons/spinner/step_4_dark.png new file mode 100644 index 000000000..e6ec8b5a3 Binary files /dev/null and b/src/main/resources/icons/spinner/step_4_dark.png differ diff --git a/src/main/resources/icons/spinner/step_4_dark.svg b/src/main/resources/icons/spinner/step_4_dark.svg new file mode 100644 index 000000000..fee5e0fd7 --- /dev/null +++ b/src/main/resources/icons/spinner/step_4_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_5.png b/src/main/resources/icons/spinner/step_5.png new file mode 100644 index 000000000..e22f5da54 Binary files /dev/null and b/src/main/resources/icons/spinner/step_5.png differ diff --git a/src/main/resources/icons/spinner/step_5.svg b/src/main/resources/icons/spinner/step_5.svg new file mode 100644 index 000000000..67ddbbf85 --- /dev/null +++ b/src/main/resources/icons/spinner/step_5.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_5@2x.png b/src/main/resources/icons/spinner/step_5@2x.png new file mode 100644 index 000000000..e36ee1dac Binary files /dev/null and b/src/main/resources/icons/spinner/step_5@2x.png differ diff --git a/src/main/resources/icons/spinner/step_5@2x_dark.png b/src/main/resources/icons/spinner/step_5@2x_dark.png new file mode 100644 index 000000000..7ff64f471 Binary files /dev/null and b/src/main/resources/icons/spinner/step_5@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_5_dark.png b/src/main/resources/icons/spinner/step_5_dark.png new file mode 100644 index 000000000..f8f9ff605 Binary files /dev/null and b/src/main/resources/icons/spinner/step_5_dark.png differ diff --git a/src/main/resources/icons/spinner/step_5_dark.svg b/src/main/resources/icons/spinner/step_5_dark.svg new file mode 100644 index 000000000..5ea1f0e33 --- /dev/null +++ b/src/main/resources/icons/spinner/step_5_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_6.png b/src/main/resources/icons/spinner/step_6.png new file mode 100644 index 000000000..56581879e Binary files /dev/null and b/src/main/resources/icons/spinner/step_6.png differ diff --git a/src/main/resources/icons/spinner/step_6.svg b/src/main/resources/icons/spinner/step_6.svg new file mode 100644 index 000000000..e01c1df1e --- /dev/null +++ b/src/main/resources/icons/spinner/step_6.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_6@2x.png b/src/main/resources/icons/spinner/step_6@2x.png new file mode 100644 index 000000000..54fda18a3 Binary files /dev/null and b/src/main/resources/icons/spinner/step_6@2x.png differ diff --git a/src/main/resources/icons/spinner/step_6@2x_dark.png b/src/main/resources/icons/spinner/step_6@2x_dark.png new file mode 100644 index 000000000..a839aa79e Binary files /dev/null and b/src/main/resources/icons/spinner/step_6@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_6_dark.png b/src/main/resources/icons/spinner/step_6_dark.png new file mode 100644 index 000000000..557264ecd Binary files /dev/null and b/src/main/resources/icons/spinner/step_6_dark.png differ diff --git a/src/main/resources/icons/spinner/step_6_dark.svg b/src/main/resources/icons/spinner/step_6_dark.svg new file mode 100644 index 000000000..f728194ca --- /dev/null +++ b/src/main/resources/icons/spinner/step_6_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_7.png b/src/main/resources/icons/spinner/step_7.png new file mode 100644 index 000000000..bce8d5db7 Binary files /dev/null and b/src/main/resources/icons/spinner/step_7.png differ diff --git a/src/main/resources/icons/spinner/step_7.svg b/src/main/resources/icons/spinner/step_7.svg new file mode 100644 index 000000000..b9c9cbdc5 --- /dev/null +++ b/src/main/resources/icons/spinner/step_7.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_7@2x.png b/src/main/resources/icons/spinner/step_7@2x.png new file mode 100644 index 000000000..2092980d4 Binary files /dev/null and b/src/main/resources/icons/spinner/step_7@2x.png differ diff --git a/src/main/resources/icons/spinner/step_7@2x_dark.png b/src/main/resources/icons/spinner/step_7@2x_dark.png new file mode 100644 index 000000000..b104ac420 Binary files /dev/null and b/src/main/resources/icons/spinner/step_7@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_7_dark.png b/src/main/resources/icons/spinner/step_7_dark.png new file mode 100644 index 000000000..6e559cdd2 Binary files /dev/null and b/src/main/resources/icons/spinner/step_7_dark.png differ diff --git a/src/main/resources/icons/spinner/step_7_dark.svg b/src/main/resources/icons/spinner/step_7_dark.svg new file mode 100644 index 000000000..bc21b84e1 --- /dev/null +++ b/src/main/resources/icons/spinner/step_7_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_8.png b/src/main/resources/icons/spinner/step_8.png new file mode 100644 index 000000000..9e313e03a Binary files /dev/null and b/src/main/resources/icons/spinner/step_8.png differ diff --git a/src/main/resources/icons/spinner/step_8.svg b/src/main/resources/icons/spinner/step_8.svg new file mode 100644 index 000000000..4ffcb1cde --- /dev/null +++ b/src/main/resources/icons/spinner/step_8.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_8@2x.png b/src/main/resources/icons/spinner/step_8@2x.png new file mode 100644 index 000000000..958cdddf6 Binary files /dev/null and b/src/main/resources/icons/spinner/step_8@2x.png differ diff --git a/src/main/resources/icons/spinner/step_8@2x_dark.png b/src/main/resources/icons/spinner/step_8@2x_dark.png new file mode 100644 index 000000000..6582c643c Binary files /dev/null and b/src/main/resources/icons/spinner/step_8@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_8_dark.png b/src/main/resources/icons/spinner/step_8_dark.png new file mode 100644 index 000000000..0f1fd0e61 Binary files /dev/null and b/src/main/resources/icons/spinner/step_8_dark.png differ diff --git a/src/main/resources/icons/spinner/step_8_dark.svg b/src/main/resources/icons/spinner/step_8_dark.svg new file mode 100644 index 000000000..ddfefcd4b --- /dev/null +++ b/src/main/resources/icons/spinner/step_8_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/icons/spinner/step_passive.png b/src/main/resources/icons/spinner/step_passive.png new file mode 100644 index 000000000..9368cb8f6 Binary files /dev/null and b/src/main/resources/icons/spinner/step_passive.png differ diff --git a/src/main/resources/icons/spinner/step_passive.svg b/src/main/resources/icons/spinner/step_passive.svg new file mode 100644 index 000000000..902ab34b8 --- /dev/null +++ b/src/main/resources/icons/spinner/step_passive.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/main/resources/icons/spinner/step_passive@2x.png b/src/main/resources/icons/spinner/step_passive@2x.png new file mode 100644 index 000000000..c0fd06cb6 Binary files /dev/null and b/src/main/resources/icons/spinner/step_passive@2x.png differ diff --git a/src/main/resources/icons/spinner/step_passive@2x_dark.png b/src/main/resources/icons/spinner/step_passive@2x_dark.png new file mode 100644 index 000000000..9252dd8eb Binary files /dev/null and b/src/main/resources/icons/spinner/step_passive@2x_dark.png differ diff --git a/src/main/resources/icons/spinner/step_passive_dark.png b/src/main/resources/icons/spinner/step_passive_dark.png new file mode 100644 index 000000000..adec960aa Binary files /dev/null and b/src/main/resources/icons/spinner/step_passive_dark.png differ diff --git a/src/main/resources/icons/spinner/step_passive_dark.svg b/src/main/resources/icons/spinner/step_passive_dark.svg new file mode 100644 index 000000000..ffcdd66da --- /dev/null +++ b/src/main/resources/icons/spinner/step_passive_dark.svg @@ -0,0 +1,4 @@ + + +