aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-01-05 19:46:16 +0100
committerfiaxh <git@lightrise.org>2022-01-05 20:10:19 +0100
commitac2af047409c3cd9ecfc3c955da5975e79565961 (patch)
treefa474e754a62e9e3cfb9dcfeb70f3cc26fa33ee5
parentb3d452265fce5d65d80cc7191747d8a574bbc25d (diff)
downloaddino-ac2af047409c3cd9ecfc3c955da5975e79565961.tar.gz
dino-ac2af047409c3cd9ecfc3c955da5975e79565961.zip
Display message sender in bold+text color instead of small+colored
-rw-r--r--main/data/conversation_content_view/item_metadata_header.ui22
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala4
-rw-r--r--main/src/ui/global_search.vala6
3 files changed, 8 insertions, 24 deletions
diff --git a/main/data/conversation_content_view/item_metadata_header.ui b/main/data/conversation_content_view/item_metadata_header.ui
index 31aa7e44..a24b27fa 100644
--- a/main/data/conversation_content_view/item_metadata_header.ui
+++ b/main/data/conversation_content_view/item_metadata_header.ui
@@ -1,38 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="DinoUiConversationSummaryItemMetaDataHeader">
- <property name="spacing">4</property>
+ <property name="spacing">6</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel" id="name_label">
<property name="use_markup">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
- <property name="valign">start</property>
+ <property name="valign">baseline</property>
<property name="visible">True</property>
<attributes>
- <attribute name="scale" value="0.8"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="dot_label">
- <property name="label">ยท</property>
- <property name="xalign">0</property>
- <property name="valign">start</property>
- <property name="visible">True</property>
- <attributes>
- <attribute name="scale" value="0.8"/>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
- <style>
- <class name="dim-label"/>
- </style>
</object>
</child>
<child>
<object class="GtkLabel" id="time_label">
<property name="xalign">0</property>
- <property name="valign">start</property>
+ <property name="valign">baseline</property>
<property name="visible">True</property>
<attributes>
<attribute name="scale" value="0.8"/>
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 = @"<span foreground=\"#$color\">$display_name</span>";
+ 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 = "<span size='small' foreground=\"#%s\">%s</span>".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;
}