mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
testgtk: Stop using gdk_display_get_maximal_cursor_size
This function is going away. Just make a reasonable assumption that cursor sizes up to 128 are supported.
This commit is contained in:
parent
edd1b0974c
commit
3fa0d4dad7
@ -3891,8 +3891,6 @@ create_cursors (GtkWidget *widget)
|
|||||||
|
|
||||||
if (cursor_demo)
|
if (cursor_demo)
|
||||||
{
|
{
|
||||||
guint w, h;
|
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||||
|
|
||||||
@ -3905,8 +3903,7 @@ create_cursors (GtkWidget *widget)
|
|||||||
gtk_entry_set_text (GTK_ENTRY (entry), "default");
|
gtk_entry_set_text (GTK_ENTRY (entry), "default");
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
||||||
|
|
||||||
gdk_display_get_maximal_cursor_size (gtk_widget_get_display (vbox), &w, &h);
|
size = gtk_spin_button_new_with_range (1.0, 128.0, 1.0);
|
||||||
size = gtk_spin_button_new_with_range (1.0, MIN (w, h), 1.0);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (size), 24.0);
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (size), 24.0);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), size);
|
gtk_box_pack_start (GTK_BOX (hbox), size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user