Skip to content

Use GtkPopover instead of GtkDialog to copy characters

Matthias requested to merge matze/gnome-characters:use-popover into main

There are several problems with the current modal dialog that is shown when clicking on a character:

  1. The dialog reveal is surprising and distracting because it always pops up in the middle of the parent window.
  2. The dialog cannot be closed by clicking anywhere else but the small close button on the dialog itself.
  3. As a user, I expect that the dialog closes when copying the character to the clipboard but that is not possible at the moment.
  4. The dialog layout probably violates some part of the GNOME HIG and at least to my eye it is not very attractive.
  5. The timed copy message is just eye candy but has no real value.

This commit replaces the dialog with a GtkPopover that opens at the position where the user clicked. It can be closed by either clicking somewhere else or by copying the character. The layout is a bit more condensed and dropped the "related" listbox which at least for me never showed up. As a bonus, the code is a bit shorter and easier to follow.

Before:

character-master

After:

character-using-popovers

Probably fixes or obsoletes the following issues: #43 #66 (closed) #67 (closed)

/cc @bertob

Edited by Christopher Davis

Merge request reports