diff options
author | fiaxh <git@lightrise.org> | 2022-01-23 18:58:13 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-01-23 19:49:06 +0100 |
commit | 19a3fa5e02984f186b5291b24954e1a5140d379e (patch) | |
tree | 79c71a41126ef1de8d725432f51567220e7aff75 /main/src/ui/conversation_content_view | |
parent | f270fc768648e8e1fd72f9c18e450db8f1ac52e9 (diff) | |
download | dino-19a3fa5e02984f186b5291b24954e1a5140d379e.tar.gz dino-19a3fa5e02984f186b5291b24954e1a5140d379e.zip |
Stop using opacity for text due to side-effects
Fixes #1178
Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/2957
Diffstat (limited to 'main/src/ui/conversation_content_view')
-rw-r--r-- | main/src/ui/conversation_content_view/message_widget.vala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/main/src/ui/conversation_content_view/message_widget.vala b/main/src/ui/conversation_content_view/message_widget.vala index 2b5fd793..ead9a570 100644 --- a/main/src/ui/conversation_content_view/message_widget.vala +++ b/main/src/ui/conversation_content_view/message_widget.vala @@ -198,9 +198,9 @@ public class MessageItemWidget : SizeRequestBin { } if (conversation.type_ == Conversation.Type.GROUPCHAT) { - markup_text = Util.parse_add_markup(markup_text, conversation.nickname, true, true); + markup_text = Util.parse_add_markup_theme(markup_text, conversation.nickname, true, true, Util.is_dark_theme(this), ref theme_dependent); } else { - markup_text = Util.parse_add_markup(markup_text, null, true, true); + markup_text = Util.parse_add_markup_theme(markup_text, null, true, true, Util.is_dark_theme(this), ref theme_dependent); } if (message.body.has_prefix("/me ")) { @@ -216,8 +216,10 @@ public class MessageItemWidget : SizeRequestBin { markup_text = @"<span size=\'$size_str\'>" + markup_text + "</span>"; } + string dim_color = Util.is_dark_theme(this) ? "#BDBDBD" : "#707070"; + if (message.edit_to != null) { - markup_text += " <span size='small' alpha='70%'>(%s)</span>".printf(_("edited")); + markup_text += @" <span size='small' color='$dim_color'>(%s)</span>".printf(_("edited")); theme_dependent = true; } @@ -226,7 +228,7 @@ public class MessageItemWidget : SizeRequestBin { if (message.direction == Message.DIRECTION_SENT && (message.marked == Message.Marked.SENDING || message.marked == Message.Marked.UNSENT)) { // Append "pending..." iff message has not been sent yet if (message.time.compare(new DateTime.now_utc().add_seconds(-10)) < 0) { - markup_text += " <span size='small' alpha='70%'>%s</span>".printf(_("pending…")); + markup_text += @" <span size='small' color='$dim_color'>%s</span>".printf(_("pending…")); theme_dependent = true; additional_info = AdditionalInfo.PENDING; } else { |