Closed markodp closed 5 months ago
@markodp since the cursors are shipped with the icons, I've transferred this from the stylesheet to the icons repo.
Hello. Can you replace the cursor with another, it is not very good quality. I want to offer you my cursor, the first you can see and comment on here - https://www.deviantart.com/vladsukhetskyi/art/Black-cursor-795861907
@markodp what's the program you're using to test this? I'd like to work on a fix for this
It's just a simple tool i wrote to see if my perceptions about misaligned are true. Just use mouse wheel to scroll between cursors.
// valac --pkg gtk+-3.0 cursor.vala
void main(string[] args) {
new Cursors().run();
}
class Cursors : Gtk.Application {
protected override void activate() {
var w = new Gtk.ApplicationWindow(this);
w.add(new Area());
w.show_all();
}
}
class Area : Gtk.DrawingArea {
public double mx;
public double my;
construct {
add_events(Gdk.EventMask.POINTER_MOTION_MASK|Gdk.EventMask.SCROLL_MASK);
set_size_request(100, 100);
}
public override bool motion_notify_event(Gdk.EventMotion e) {
mx = e.x;
my = e.y;
queue_draw();
return false;
}
public override bool scroll_event (Gdk.EventScroll e) {
switch(e.direction) {
case DOWN: choice = (choice + 1) % choices.length; break;
case UP: choice = (choice + choices.length - 1) % choices.length; break;
}
queue_draw();
return true;
}
public override bool draw(Cairo.Context cr) {
var c = new Gdk.Cursor.from_name(get_display(), choices[choice]);
get_parent_window().set_cursor(c);
int w = get_allocated_width();
int h = get_allocated_height();
cr.set_source_rgb(0,0,1);
cr.move_to(5, 20);
cr.show_text(choices[choice]);
cr.set_source_rgb(1,0,0);
cr.set_line_width(1);
cr.move_to(mx, 0);
cr.line_to(mx, h);
cr.move_to(0, my);
cr.line_to(w, my);
cr.stroke();
return false;
}
int choice = 2;
string[] choices = {
"none",
"default",
"help",
"pointer",
"context-menu",
"progress","wait",
"cell",
"crosshair",
"text","vertical-text",
"alias",
"copy",
"no-drop",
"move",
"not-allowed",
"grab","grabbing",
"all-scroll",
"col-resize","row-resize",
"n-resize","e-resize","s-resize","w-resize",
"ne-resize","nw-resize","sw-resize","se-resize",
"ew-resize","ns-resize","nesw-resize","nwse-resize",
"zoom-in","zoom-out",
};
}
A lot of cursors don't have proper offset/hotspot set. It's most noticeable with resize cursors while hovering over window resize area.
some cursor examples with highlighted current mouse position: