woelper / oculante

A fast and simple image viewer / editor for many operating systems

Home Page:https://github.com/woelper/oculante

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delete and overwrite operations should ask for a confirmation

Cosebdd opened this issue · comments

Describe the bug
When the user presses Delete or Overwrite in the Edit mode (I'm not sure if there are other destructive operations), these operations fire immediately without any confirmation prompt.

To Reproduce
Steps to reproduce the behavior:

  1. Open an image
  2. Press Delete

Or

  1. Open an image
  2. Press E
  3. Press Overwrite

Expected behavior
I expect that I will be prompted with a dialog asking for confirmation. This would almost eliminate the possibility of removing/overwriting something by mistake, and if someone doesn't like it there could be a "never ask me again" checkbox.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 0.8.22

This is of course a good suggestion. The UI library I am using makes modal dialogs hard - this is the main reason this is not done. Maybe I can come up with a smart way to do it.

This seems to be an option:

https://lib.rs/crates/egui-modal

Depending on how hard this would be to implement, holding to confirm dangerous actions such as overwriting or deleting is a pretty good way of handling accidental actions. Below is a design I've made, the darker red at the left is showing the progress, when the progress bar completes then the action is fulfilled, 1500ms should be a good default time:

1718246940