From 27afc2164f31f40e79606c72005277d730c1f005 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 14 Mar 2017 00:25:19 +0100 Subject: [PATCH] Small fixes in message view --- main/src/ui/conversation_summary/merged_message_item.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/src/ui/conversation_summary/merged_message_item.vala b/main/src/ui/conversation_summary/merged_message_item.vala index ec6b4f7b..695bf589 100644 --- a/main/src/ui/conversation_summary/merged_message_item.vala +++ b/main/src/ui/conversation_summary/merged_message_item.vala @@ -47,7 +47,7 @@ public class MergedMessageItem : Grid { } private void update_display_style() { - RGBA bg = get_style_context().get_background_color(StateFlags.NORMAL); + RGBA bg = message_text_view.get_style_context().get_background_color(StateFlags.NORMAL); bool dark_theme = (bg.red < 0.5 && bg.green < 0.5 && bg.blue < 0.5); string display_name = Util.get_message_display_name(stream_interactor, messages[0], conversation.account); @@ -114,6 +114,8 @@ public class MergedMessageItem : Grid { int start; int end; match_info.fetch_pos(0, out start, out end); + start = text[0:start].char_count(); + end = text[0:end].char_count(); TextIter start_iter; TextIter end_iter; message_text_view.buffer.get_iter_at_offset(out start_iter, absolute_start + start);