diff options
author | fiaxh <git@lightrise.org> | 2020-03-08 22:34:04 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-03-09 13:33:10 +0100 |
commit | efc085dc11d678aba3e1c9a5da3a127557777b78 (patch) | |
tree | 35c12d4ddf7e7b6f0029036097f7b5c471896226 | |
parent | ed6eda129edd94e07f9cdf8d8446576d50460031 (diff) | |
download | dino-efc085dc11d678aba3e1c9a5da3a127557777b78.tar.gz dino-efc085dc11d678aba3e1c9a5da3a127557777b78.zip |
Ellipsize long display names
-rw-r--r-- | main/data/conversation_content_view/item_metadata_header.ui | 1 | ||||
-rw-r--r-- | main/src/ui/global_search.vala | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/main/data/conversation_content_view/item_metadata_header.ui b/main/data/conversation_content_view/item_metadata_header.ui index 93940c9a..4252a0a3 100644 --- a/main/data/conversation_content_view/item_metadata_header.ui +++ b/main/data/conversation_content_view/item_metadata_header.ui @@ -6,6 +6,7 @@ <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="visible">True</property> diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala index e92a6ac9..4df3c6b5 100644 --- a/main/src/ui/global_search.vala +++ b/main/src/ui/global_search.vala @@ -255,7 +255,7 @@ public class GlobalSearch : Overlay { 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("") { use_markup=true, xalign=0, visible=true }; + Label name_label = new Label("") { ellipsize=EllipsizeMode.END, use_markup=true, xalign=0, visible=true }; name_label.label = @"<span size='small' foreground=\"#$color\">$display_name</span>"; grid.attach(name_label, 1, 0, 1, 1); return grid; |