blob: d0c965027c1dcd285e84106b34255a20e0e85287 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From c6fa415ed7b71197f27e946b8a854d74a8e92f84 Mon Sep 17 00:00:00 2001
From: Neui <neuisen@googlemail.com>
Date: Sun, 2 May 2021 01:12:08 +0200
Subject: [PATCH] Prevent flicker cursor when moving over a tag
When hovering over a tag in the task editor, it'll "flicker" between a
normal text cursor and the pointer cursor. This fixes this by simply
calling set_cursor just once.
---
GTG/gtk/editor/taskview.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py
index 1313ead8..9358b98f 100644
--- a/GTG/gtk/editor/taskview.py
+++ b/GTG/gtk/editor/taskview.py
@@ -599,7 +599,6 @@ class TaskView(Gtk.TextView):
# Reset cursor and hover states
cursor = Gdk.Cursor.new_from_name(window.get_display(),
'text')
- window.set_cursor(cursor)
if self.hovered_tag:
try:
@@ -615,12 +614,12 @@ class TaskView(Gtk.TextView):
tag.set_hover()
cursor = Gdk.Cursor.new_from_name(window.get_display(),
'pointer')
- window.set_cursor(cursor)
self.hovered_tag = tag
except (AttributeError, IndexError):
# Not an interactive tag, or no tag at all
pass
+ window.set_cursor(cursor)
def do_populate_popup(self, popup) -> None:
--
2.30.0
|