Rookiestyle / ColoredPassword

Use different colors for digits and special chars in passwords
GNU General Public License v3.0
65 stars 9 forks source link

Selecting multiple entries cauuses display problems when using Dark Mode #21

Closed ForgeSource closed 1 year ago

ForgeSource commented 1 year ago

Overview

When using Dark Mode (via the KeeTheme plugin), selecting multiple entries causes text display for all columns other than Password in entry list to corrupt.

Steps to Reproduce

  1. Install KeeTheme plugin and set to Dark Mode.
  2. Install ColoredPassword and set "Color passwords in entry list"
  3. Select a number of entries in the Entry List view (e.g. with -A)
  4. Observe that all columns other than Password display incorrectly. They seem to display twice, with one set slightly offset to the right.

Expected Behavior

Expect display of columns other than Password to not be altered in any way.

Actual Behavior

All columns other than Password display incorrectly. They seem to display twice, with one set slightly offset to the right. Removing ColoredPassword, or removing Kee Theme, or setting Kee Theme to not use Dark Mode all resolve the issue. (But I'm trying to achieve coloured passwords with a dark mode).

Context

OS: Windows 11 Pro KeePass Version: 2.53 (64-bit) Plugin Version: 0.15

Rookiestyle commented 1 year ago

image

This is how it looks like for me. I don't see doubled display of all columns except the password column.

Which version of KeeTheme do you use? Please post a screenshot

ForgeSource commented 1 year ago

Many thanks!

This is what I see when I select all entries (compared with none selected).

KeeTheme version is 0.10.2.0

Test selected Test unselected

Rookiestyle commented 1 year ago

I still can't reproduce it unfortunately.

Do you have other plugins installed besides KeeTheme and ColoredPassword?

ForgeSource commented 1 year ago

Thank you for trying. I had 3 other PlugIns - YetAnotherFaviconDownloader, NotesFontSelector and KeePassRPC installed. I have tried removing all of these, and restarted KeePass but it has made no difference to the issue.

Also, I was mistaken in saying that I need to "Select All" for the issue to manifest itself. Selecting a Single entry in the Entry List does the same. On closer inspection, it also looks as if the whole entry is being duplicated one space to the right; if you look at the screen shots above, and look at the password field, you can see that the last character is duplicated (uncoloured) at the right of the field.

I'm attaching a couple of additional screenshots showing how I have ColoredPassword configured, in case that helps. Plugins2 Plugins1 Plugins3

Rookiestyle commented 1 year ago

OK, I could finally reproduce it.

Both plugins change the entry list in a special way. This way is called OwnerDraw and tells the OS to don't do anything. The complete content (text, icons, chexkboxes, ...) of the listview has to be drawn by the plugins.

If KeePass loads KeeTheme prior to loading ColoredPassword, both plugins draw the entrylist and there is a small gap regarding the position of all the content including the texts. If KeePass loads ColoredPassword prior to KeeTheme, KeeTheme detects that OwnerDraw is already activ and does not draw anything at all.

The attached version will remove KeeTheme's drawing routine to compensate the first case.

Let me know your results with this version. If fine for you as well, I'll release after removing my debug message. ColoredPassword.zip

ForgeSource commented 1 year ago

Yes, I can confirm that this version fixes it.

Thank you VERY much for the time spent both providing and supporting this plug-in. I really appreciate it.