CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

Item Background Color (Alternate) Not Displaying Correctly in History List CopyQ v14.0.0

Open H5820121 opened this issue 8 months ago • 11 comments

Software Version: CopyQ v14.0.0 Operating System: Windows 11 25H2

Description: In the latest version (v14), the "Alternate" background color setting for items in the clipboard history list does not appear to be applied correctly.

H5820121 avatar Mar 24 '26 14:03 H5820121

What does it mean exactly? Can you share a screenshot? (You may need to disable "Hide from screenshots and recordings" option in General config tab.)

hluk avatar Mar 26 '26 11:03 hluk

@hluk This problem exists in all themes. For example, the new NORD theme:

Image

Or the solarized-light them:

Image

I have a theme that I set up with a frame, in the previous version the frame was complete on all sides, but in the new version it is cut off at the top:

Image Image

The strange thing is that these bugs only occur when you copy simple text, but for example, if you copy an image, then the frame looks complete, and the alternate color also appears correctly:

Image

You can see in the last screenshot that in item number 2, which is plain text, the alternate color does not appear correctly. It only appears as a stripe on the left side, but in item number 4, which is an image, it appears correctly, and the frame also appears correctly. And I want to emphasize that all these bugs weren't there before, they only appeared now in version 14.

H5820121 avatar Mar 26 '26 12:03 H5820121

I cannot reproduce this myself, but from the screenshots it seems that the alternate background is there, but the item text overrides it - the text itself normally should have transparent background, unless it is an HTML text which overrides background.

Can you check if you have Text plugin enabled in Item config tab in Preferences?

Image

It is also possible that the app does not pick up themes. Can you check if there is "themes" sub-folder in the directory with copyq.exe?

Are there any warnings or errors in logs (F12 shortcut)?

hluk avatar Mar 26 '26 17:03 hluk

@hluk My settings are fine and as you can see:

Image

And I want to emphasize that I didn't make any changes to my settings from version 13, I just updated to version 14 and then the bugs in the theme appeared. And of course, I have the theme folder and it's applied.

On F12 I get this: [2026-03-26 19:39:04.671] Note : Starting server: CopyQ 14.0.0-gd935d521-v14.0.0 [2026-03-26 19:39:05.862] Warning : [default] QSystemTrayIcon::setVisible: No Icon set [2026-03-26 19:39:06.338] ERROR : [copyq.plugin.itemencrypted] GnuPG stderr: "gpg: invalid key resource URL 'C:\\Users\\CB\\AppData\\Roaming\\copyq\\copyq.pub'\ngpg: keyblock resource '(null)': General error\n" [2026-03-26 19:39:20.784] Warning <cmd/monitorClipboard-14844>: [qt.qpa.mime] Retrying to obtain clipboard.

By the way, what does this warning mean: Warning <cmd/monitorClipboard-14844>: [qt.qpa.mime] Retrying to obtain clipboard.

H5820121 avatar Mar 26 '26 17:03 H5820121

Software Version: CopyQ v14.0.0 Operating System: Windows 11 25H2

I'm seeing the same thing, though it seems to display correctly if the items are pinned. Pinned:

Image

Unpinned:

Image

*horrid colours for demo only lol

AlexW-13 avatar Mar 26 '26 22:03 AlexW-13

Hmm, I'm still not sure how to reproduce this.

Can you try changing stylesheets and restarting the app?

Possible fix in themes/items.css (in the installation directory): Change the default CSS rule so that #item and #item_child get background: transparent instead of background: ${bg}. The #ClipboardBrowser view keeps background: ${bg}.

Before:

#ClipboardBrowser,#item,#item_child{
    ;${font}
    ;color: ${fg}
    ;background: ${bg}
}

After:

#ClipboardBrowser{
    ;${font}
    ;color: ${fg}
    ;background: ${bg}
}
#item,#item_child{
    ;${font}
    ;color: ${fg}
    ;background: transparent
}

You can also try setting background: red to #ClipboardBrowser to ensure the stylesheet has any effect.

hluk avatar Mar 27 '26 07:03 hluk

Oh, I can actually reproduce this with wine set to Windows 11 mode! The background: transparent workaround does not work. Looking into it.

hluk avatar Mar 27 '26 07:03 hluk

Hmm, I'm still not sure how to reproduce this.

Can you try changing stylesheets and restarting the app?

Possible fix in themes/items.css (in the installation directory): Change the default CSS rule so that #item and #item_child get background: transparent instead of background: ${bg}. The #ClipboardBrowser view keeps background: ${bg}.

Before:

#ClipboardBrowser,#item,#item_child{ ;${font} ;color: ${fg} ;background: ${bg} }

After:

#ClipboardBrowser{ ;${font} ;color: ${fg} ;background: ${bg} } #item,#item_child{ ;${font} ;color: ${fg} ;background: transparent }

You can also try setting background: red to #ClipboardBrowser to ensure the stylesheet has any effect.

The alternate color issue seems to have been resolved, but there is still the problem I reported above with my theme where the frame is not appearing at the top of it.

H5820121 avatar Mar 27 '26 07:03 H5820121

The alternate color issue seems to have been resolved, but there is still the problem I reported above with my theme where the frame is not appearing at the top of it.

Oh, I see. Thanks for testing it. Setting background: transparent works, but it needs to be set for the selected items too.

Here is fixed stylesheet: https://raw.githubusercontent.com/hluk/CopyQ/27330cc2800201ff2ac3696475e002977ba4522a/shared/themes/items.css

hluk avatar Mar 27 '26 08:03 hluk

The alternate color issue seems to have been resolved, but there is still the problem I reported above with my theme where the frame is not appearing at the top of it.

Oh, I see. Thanks for testing it. Setting background: transparent works, but it needs to be set for the selected items too.

Here is fixed stylesheet: https://raw.githubusercontent.com/hluk/CopyQ/27330cc2800201ff2ac3696475e002977ba4522a/shared/themes/items.css

All the issues I reported seem to have now been properly fixed, thank you very much!

H5820121 avatar Mar 27 '26 08:03 H5820121

Here are Windows builds with the fix: https://github.com/hluk/CopyQ/actions/runs/23643838732#artifacts

It additionally fixes color of the indicator for pinned items and adds other small cosmetic improvements.

hluk avatar Mar 27 '26 11:03 hluk