From ac2af047409c3cd9ecfc3c955da5975e79565961 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 5 Jan 2022 19:46:16 +0100 Subject: Display message sender in bold+text color instead of small+colored --- .../ui/conversation_content_view/conversation_item_skeleton.vala | 4 +--- main/src/ui/global_search.vala | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'main/src') 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 ae2e6018..a14e9019 100644 --- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala +++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala @@ -216,9 +216,7 @@ public class ItemMetaDataHeader : Box { } private void update_name_label() { - string display_name = Markup.escape_text(Util.get_participant_display_name(stream_interactor, conversation, item.jid)); - string color = Util.get_name_hex_color(stream_interactor, conversation.account, item.jid, Util.is_dark_theme(name_label)); - name_label.label = @"$display_name"; + name_label.label = Markup.escape_text(Util.get_participant_display_name(stream_interactor, conversation, item.jid)); } private void update_received_mark() { diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala index abefccac..e79ac083 100644 --- a/main/src/ui/global_search.vala +++ b/main/src/ui/global_search.vala @@ -261,9 +261,9 @@ public class GlobalSearch : Overlay { grid.attach(image, 0, 0, 1, 2); string display_name = Util.get_participant_display_name(stream_interactor, item.conversation, item.jid); - string color = Util.get_name_hex_color(stream_interactor, item.message.account, item.jid, false); // TODO Util.is_dark_theme(name_label) - Label name_label = new Label("") { ellipsize=EllipsizeMode.END, use_markup=true, xalign=0, visible=true }; - name_label.label = "%s".printf(color, Markup.escape_text(display_name)); + Label name_label = new Label(display_name) { ellipsize=EllipsizeMode.END, use_markup=true, xalign=0, visible=true }; + name_label.attributes = new AttrList(); + name_label.attributes.insert(attr_weight_new(Weight.BOLD)); grid.attach(name_label, 1, 0, 1, 1); return grid; } -- cgit v1.2.3-70-g09d2