[polari/wip/raresv/userTrackerAndPopoversRebase: 6/24] chatView: fix height of rectangle used to position the popup arrow.
- From: Rares Visalom <raresvisalom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/raresv/userTrackerAndPopoversRebase: 6/24] chatView: fix height of rectangle used to position the popup arrow.
- Date: Fri, 5 Aug 2016 23:40:41 +0000 (UTC)
commit 9bc24fca1ce1c78294b3b1425cefbac152f60449
Author: raresv <rares visalom gmail com>
Date: Wed Aug 3 17:11:33 2016 +0300
chatView: fix height of rectangle used to position the popup arrow.
src/chatView.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index a00d40c..eddbbef 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -1243,10 +1243,11 @@ const ChatView = new Lang.Class({
let rect1 = view.get_iter_location(start);
let rect2 = view.get_iter_location(end);
+ [rect1.y, rect1.height] = view.get_line_yrange(start);
+
[rect1.x, rect1.y] = view.buffer_to_window_coords(Gtk.TextWindowType.WIDGET, rect1.x, rect1.y);
[rect2.x, rect2.y] = view.buffer_to_window_coords(Gtk.TextWindowType.WIDGET, rect2.x, rect2.y);
rect1.width = rect2.x - rect1.x;
- rect1.height = rect2.y - rect1.y;
//TODO: special chars?
let actualNickName = view.get_buffer().get_slice(start, end, false);
@@ -1266,11 +1267,14 @@ const ChatView = new Lang.Class({
contactFound = true;
break;
}
+ else if (tag._popover.user == tag._contacts[i]) {
+ contactFound = true;
+ break;
+ }
}
}
if (!contactFound) {
- //tag._popover.user = null;
if (tag._contacts[0]) {
tag._popover.user = tag._contacts[0];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]