diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2014-02-04 12:55:44 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2014-02-04 16:52:08 (GMT) |
commit | 870bf6c92ab19b6360b35c0056c1da96a852e646 (patch) | |
tree | a71d48f879d90df13bc9820022227443bb576751 | |
parent | a08cee03d7cf1b5363d45367b64f4297bc443ee9 (diff) |
Show better cursors in the background editor
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
-rw-r--r-- | reorderwindow.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/reorderwindow.py b/reorderwindow.py index 2a891de..7f0d090 100644 --- a/reorderwindow.py +++ b/reorderwindow.py @@ -382,10 +382,18 @@ class CanvasEditor(Gtk.EventBox): def mouse_move(self, widget, event): cursor = None - if self.image.is_in_point(event.x, event.y): - cursor = Gdk.Cursor(Gdk.CursorType.SIZING) + if self.image.is_in_point(event.x, event.y, + self.image.points["upper_left"]) or \ + self.image.is_in_point(event.x, event.y, + self.image.points["lower_right"]): + cursor = Gdk.Cursor(Gdk.CursorType.BOTTOM_RIGHT_CORNER) + elif self.image.is_in_point(event.x, event.y, + self.image.points["upper_right"]) or \ + self.image.is_in_point(event.x, event.y, + self.image.points["lower_left"]): + cursor = Gdk.Cursor(Gdk.CursorType.BOTTOM_LEFT_CORNER) elif self.image.is_selected(event.x, event.y): - cursor = Gdk.Cursor(Gdk.CursorType.HAND2) + cursor = Gdk.Cursor(Gdk.CursorType.FLEUR) self.get_window().set_cursor(cursor) def moving(self, widget, event): |