From 4f950d401b2feb799b20e3231e6f09b892614a8c Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Mon, 29 Jan 2024 01:29:54 +0100 Subject: Show type when hovering encrypted message icon, encrypted icon has separate color for OMEMO or PGP This commit is adressing https://github.com/dino/dino/issues/1240: - If you hover the encryption icon on your messages if present, it should now say "This message is PGP encrypted" or "This message is OMEMO encrypted". - As a visual aid, the icon's color change accordingly. PGP is blue-ish, OMEMO is off green-ish. - NOTE: There's no color if your theme's 'changes-prevent-symbolic' icon is not a SVG. --- .../ui/conversation_content_view/conversation_item_skeleton.vala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala index 5d86f6c7..5c71d4fb 100644 --- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala +++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala @@ -154,6 +154,14 @@ public class ConversationItemSkeleton : Plugins.ConversationItemWidgetInterface, if (encryption_entry != null) icon_name = encryption_entry.get_encryption_icon_name(conversation, ci.content_item); encryption_image.icon_name = icon_name ?? "changes-prevent-symbolic"; encryption_image.visible = true; + if (item.encryption == Encryption.OMEMO) { + encryption_image.tooltip_text = Util.string_if_tooltips_active(_("This message is OMEMO encrypted.")); + Util.force_color(encryption_image, "#659E4F"); + } + if (item.encryption == Encryption.PGP) { + encryption_image.tooltip_text = Util.string_if_tooltips_active(_("This message is PGP encrypted.")); + Util.force_color(encryption_image, "#008BF0"); + } } if (item.encryption == Encryption.NONE) { -- cgit v1.2.3-54-g00ecf