xatupal / KeeTheme

KeePass Plugin
MIT License
449 stars 36 forks source link

UI glitch/flash during KeePass startup #55

Open Gittyperson opened 3 years ago

Gittyperson commented 3 years ago

With the Dark Theme enabled, the KeePass window appears for a split second during startup. This is especially noticeable when KP is set to start minimized. Disabling the Dark Theme solves it, without having to remove KeeTheme.

There's a workaround to this: setting the KeePass window to non-maximized mode, but it doesn't seem to work consistently.

Windows 10 21H1 19043.1052, KeePass 2.48.1 x64, KeeTheme 0.9.2.0

https://sourceforge.net/p/keepass/discussion/329220/thread/3b696041f8/

Gittyperson commented 3 years ago

Short video example:

https://user-images.githubusercontent.com/7165208/126875658-ee4f5467-f19b-4d62-b669-904d37e81b95.mp4

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 2 years ago

issue confirmed on windows 11 as well

xatupal commented 2 years ago

Hi! Technically speaking, all plugins are loaded in the middle of the OnFormLoad method of MainForm and according to MSDN that method should be executed before MainForm is shown. It means that KeeTheme should be able to change the appearance before MainForm becomes visible. Unfortunately the reality is different. I've attached a picture showing how KeePass looks like at the moment when plugins are loaded. The MainForm seems to be partially loaded and when KeeTheme executes you see flickering because it is changing appearance of visible form.

I've investigated the problem and I've found same problem at stackoverflow. Unfortunately the WindowState is changed before my plugin is loaded, so I can't fix it programmatically. It's all in @dreichl hands. KeePassStarting

Gittyperson commented 2 years ago

I'm not sure if the recent 0.9.5/0.9.6 releases were meant to solve this issue, but I'll just report that the issue remains.

xatupal commented 2 years ago

The fix should be applied to the KeePass, not to the KeeTheme. There is an ongoing discussion about this problem: https://sourceforge.net/p/keepass/discussion/329220/thread/3b696041f8/