xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.62k stars 88 forks source link

After adjusting the width of the "query panel" and other panels, restarting the software will restore the default width #1048

Open blucca opened 1 year ago

blucca commented 1 year ago

描述 bug 调整“查询面版”等面版的宽度后,重启软件会恢复默认宽度

测试视频 https://github.com/xiaoyifang/goldendict-ng/assets/127029904/e1bf8e64-a3bf-4961-8192-c0a7d5a00ce3

软件版本 GoldenDict-ng-v23.07.25-alpha.230805.1ee42bd5

额外信息 之前使用的版本是 GoldenDict-ng-v23.07.25-alpha.230727.a1e62f62,这个版本会记住调整后的宽度

github-actions[bot] commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically.

Describe the bug After adjusting the width of the "query panel" and other panels, restarting the software will restore the default width

TEST VIDEO https://github.com/xiaoyifang/goldendict-ng/assets/127029904/e1bf8e64-a3bf-4961-8192-c0a7d5a00ce3

Software version GoldenDict-ng-v23.07.25-alpha.230805.1ee42bd5

extra information The version used before is GoldenDict-ng-v23.07.25-alpha.230727.a1e62f62, this version will be remembered hold the adjusted width

xiaoyifang commented 1 year ago

seems a regression of commit https://github.com/xiaoyifang/goldendict-ng/commit/1ffd7296149e02dd83c49dd3ca2cf6f984d04fe9

@shenlebantongying Can you help to take a look?

shenlebantongying commented 1 year ago

Bisecting by moving restoreState/restoreGeometry between the code in this change tells me that restoreState/restoreGeometry have to be called before show(). If called after show(), DockWidget's geometry cannot be applied.

https://github.com/xiaoyifang/goldendict-ng/commit/1ffd7296149e02dd83c49dd3ca2cf6f984d04fe9#diff-56c809abf8615ec9b8833e8e0ddc82d72ff689ed428040d4551b7cb2518b6a0fR865

xiaoyifang commented 1 year ago

fixed on Windows 11 ,but still persisted on Windows 10.

atauzki commented 1 year ago

no effect in my win11 either.

czz404 commented 5 months ago

我这里 win11 上 portable mode 重启软件会恢复默认宽度 不用 portable mode 就正常

github-actions[bot] commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically.

I'm on win11 here Restarting the software in portable mode will restore the default width. It's normal without portable mode

LakeishaKowalczyk commented 1 week ago

@xiaoyifang +1

Windows 11 Portable Mode Goldendict-ng 24.09.0.316ec900 at 2024-09-15T14:12:19Z Qt 6.7.2 Visual C++ Compiler 194134120 windows winnt 10.0.22000 x86_64-little_endian-llp64 Flags: MAKE_ZIM_SUPPORT MAKE_CHINESE_CONVERSION_SUPPORT NO_TTS_SUPPORT no_ffmpeg_player