feat: add capture delay option to the tray icon - #4407
Conversation
Add a submenu to the tray icon to allow quick selection of the capture delay for captures initiated from the tray icon. Introduce a new `captureDelay` config option to store this value. When a delayed capture is started, a subtle countdown is displayed until the capture begins.
1a90b91 to
ce51ac5
Compare
|
Thanks for the PR. We generally prefer to have a vrief discussion before receiving a PR with new features. This is because we can to some extent discuss the implementation direction and reduce your development time, and to avoid massive code change during the review. Regarding this PR:
I'm not against this feature, but I personally don't see so much value in, perhaps because I almost never use the tray icon menu 😅. Regardless, looks like a clean implementation, and if users can benefit from it, I have zero objections. I'm curious to know other dev's and contributors opinion on this PR and feature |
|
I understand, sorry for the feature out of the blue and not need to feel forced to merge the feature if ever. To reply to your points:
By curiosity, how do you use it if not with the tray icon? Just started from cli for single shot? |
|
I usually use the "launcher" which can be accessed from the tray icon to set a delay. |
|
Which platform did you test on? I get this error on wayland KDE: qt.qpa.wayland: Failed to create popup. Ensure popup QWidgetWindow(0x5587af7a3e40, name="CountdownWindowClassWindow") has a transientParent set. |
|
@borgmanJeremy On Plaasma Wayland on Arch it complied for me cleanly |
|
@mmahmoudian did the feature work for you? It compiled for me but gave that as a runtime error. I think I would actually use this a lot in my workflow since the only reason I ever open the launcher is to set a delay. |
I think it did. Let me confirm that when I get behind the computer. There is a slight chance that I am not remembering correctly as I've done a quite a bunch of testing and compiling these past few days. I'll report back soon... |
|
Sorry for the little delay of my reply. For the bug, I see a few things online related to Wayland with this issue: If ever you have the possibility to do a little bit of debugging on the computer where it crashes:
Put a log to see if you have a value in "screen"? Otherwise, I see the following snippet in the other window that I hope is working for you: Maybe you could try to follow the advice and add the "show()" before the "QScreen .." code in Countdownwindow.cpp. |
|
It might be a bug in a recent version of QT also:
Can you check that are not using a version that is affected by the issue? |
|
Circling back to this, I can report it gives the exact same issue on cosmic (not just kde): qt.qpa.wayland: Failed to create popup. Ensure popup QWidgetWindow(0x5607a86b7720, name="CountdownWindowClassWindow") has a transientParent set. These are my environment details: Flameshot v13.3.0 (ce51ac5) |
Add a submenu to the tray icon to allow quick selection of the capture delay for captures initiated from the tray icon.
Introduce a new
captureDelayconfig option to store this value.When a delayed capture is started, a (not too big) countdown is displayed until the capture begins.
Easy delayed screenshot, using the interface, is a feature that I need very often, and it looks like that it is also a regularly requested feature:
#2625
#582
#233
And the countdown provided with this would probably also solve:
#3227
#358
Examples:

(Don't mind the submenu that is on the left despite the arrow that is on the right, this is the standard behavior of my desktop when the tray icons are on the right)