You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
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
|
|
|