aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2023-12-04 01:10:20 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2023-12-05 01:30:21 +0100
commit92a428ce36349e4dd5e1596fb7d78f3cd4779e03 (patch)
tree3f520d0b0c97d387e431445d03f47805cb8f01c7 /main/src
parent85ea7e50083be4be11a675c83835e2f1f957d0dc (diff)
downloaddino-92a428ce36349e4dd5e1596fb7d78f3cd4779e03.tar.gz
dino-92a428ce36349e4dd5e1596fb7d78f3cd4779e03.zip
Make encryption icon status more noticeable
- should close #971 - also add a tooltip about encryption details
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/chat_input/encryption_button.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/ui/chat_input/encryption_button.vala b/main/src/ui/chat_input/encryption_button.vala
index 1f991338..0349f11d 100644
--- a/main/src/ui/chat_input/encryption_button.vala
+++ b/main/src/ui/chat_input/encryption_button.vala
@@ -73,6 +73,10 @@ public class EncryptionButton {
private void update_encryption_menu_icon() {
set_icon(conversation.encryption == Encryption.NONE ? "changes-allow-symbolic" : "changes-prevent-symbolic");
+ string encbtn_bg_color = conversation.encryption == Encryption.NONE ? "#F2EE22" : "transparent";
+ string encbtn_tooltip = conversation.encryption == Encryption.NONE ? _("Your message won't be encrypted. You can click to pick an encryption method.") : _("Your message will be encrypted.") ;
+ menu_button.tooltip_text = Util.string_if_tooltips_active(_(encbtn_tooltip));
+ Util.force_css(menu_button, ".encryption-button {background-color: " + encbtn_bg_color +";border-radius: 15px; margin-bottom:2px; margin-right:2px;}");
}
private void update_visibility() {
@@ -111,4 +115,4 @@ public class EncryptionButton {
}
}
-} \ No newline at end of file
+}