sugarlabs / sugar-toolkit-gtk3

Sugar Learning Environment, Activity Toolkit, GTK 3.
GNU Lesser General Public License v2.1
21 stars 80 forks source link

Set sugar cursor internally in sugar #314

Closed erilyth closed 8 years ago

erilyth commented 8 years ago

Originally Gio.Settings were used to set the cursor. Set the cursor internally in Gdk so it doesn't effect the rest of the system.

Related PR in sugar: https://github.com/sugarlabs/sugar/pull/670

samdroid-apps commented 8 years ago

This code only sets to the the left cursor from the current theme. This patch does not fix the issue, what if the user has more than one cursor theme installed (Eg. Adwainta, HighColor - all pulled in by GNOME). This patch doesn't like do anything!

erilyth commented 8 years ago

@samdroid-apps , Without the patch the cursor is not set to the sugar-cursor which we set from the artwork so we end up having the standard cursor. (This is when I apply sugarlabs/sugar#670 and this together)

screenshot from 2016-04-11 15 31 09

(This is when I only apply sugarlabs/sugar#670) screenshot from 2016-04-11 15 29 59

erilyth commented 8 years ago

@samdroid-apps , Ah I understood what is happening, my default cursor on my system is the one that sugar uses so its getting set to that when I use this patch. Is there any way I can get a pixbuf of the cursor from the sugar-artwork/cursor, so that the cursor can be loaded using the pixbuf? I think that this needs to be done everywhere where we are currently just setting the cursor using Gdk.Cursor(Gdk.CursorType(xyz)). Not just for the standard cursor, but for all the different types of cursors.

quozl commented 8 years ago

@erilyth, I agree that the current code using Gdk.Cursor in many places is very messy; it could be refactored into a common function. Some of my cursor fixes in the past year have been made with the intention of eventually refactoring. You might consider them.