forked from AuroraMiddleware/gtk
Merge branch 'cursor-things' into 'master'
Cursor things See merge request GNOME/gtk!764
This commit is contained in:
commit
ba1c5cf43f
@ -4897,13 +4897,7 @@ gtk_label_set_selectable_hint (GtkLabel *label)
|
||||
widget = GTK_WIDGET (label);
|
||||
|
||||
if (priv->select_info->selectable)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gdk_cursor_new_from_name ("text", NULL);
|
||||
gtk_widget_set_cursor (widget, cursor);
|
||||
g_object_unref (cursor);
|
||||
}
|
||||
gtk_widget_set_cursor_from_name (widget, "text");
|
||||
}
|
||||
|
||||
#define GTK_TYPE_LABEL_CONTENT (gtk_label_content_get_type ())
|
||||
|
@ -2856,14 +2856,11 @@ static void
|
||||
gtk_text_obscure_mouse_cursor (GtkText *self)
|
||||
{
|
||||
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
|
||||
GdkCursor *cursor;
|
||||
|
||||
if (priv->mouse_cursor_obscured)
|
||||
return;
|
||||
|
||||
cursor = gdk_cursor_new_from_name ("none", NULL);
|
||||
gtk_widget_set_cursor (GTK_WIDGET (self), cursor);
|
||||
g_object_unref (cursor);
|
||||
gtk_widget_set_cursor_from_name (GTK_WIDGET (self), "none");
|
||||
|
||||
priv->mouse_cursor_obscured = TRUE;
|
||||
}
|
||||
|
@ -1774,7 +1774,6 @@ gtk_window_capture_motion (GtkWidget *widget,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
GdkCursor *cursor = NULL;
|
||||
gint i;
|
||||
const gchar *cursor_names[8] = {
|
||||
"nw-resize", "n-resize", "ne-resize",
|
||||
@ -1786,15 +1785,10 @@ gtk_window_capture_motion (GtkWidget *widget,
|
||||
{
|
||||
if (edge_under_coordinates (GTK_WINDOW (widget), x, y, i))
|
||||
{
|
||||
cursor = gdk_cursor_new_from_name (cursor_names[i], NULL);
|
||||
gtk_widget_set_cursor_from_name (widget, cursor_names[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_set_cursor (widget, cursor);
|
||||
|
||||
if (cursor)
|
||||
g_object_unref (cursor);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user