mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 15:14:17 +00:00
switch: Use a gizmo as slider
The button was jut a stop-gap solution before GtkGizmo existed.
This commit is contained in:
parent
c0a1793d59
commit
071c205c92
@ -68,6 +68,7 @@
|
||||
#include "gtkprogresstrackerprivate.h"
|
||||
#include "gtksettingsprivate.h"
|
||||
#include "gtkcontainerprivate.h"
|
||||
#include "gtkgizmoprivate.h"
|
||||
|
||||
#include "fallback-c89.c"
|
||||
|
||||
@ -671,7 +672,7 @@ gtk_switch_init (GtkSwitch *self)
|
||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
|
||||
|
||||
priv->slider = g_object_new (GTK_TYPE_BUTTON, "css-name", "slider", NULL);
|
||||
priv->slider = gtk_gizmo_new ("slider", NULL, NULL, NULL);
|
||||
gtk_widget_set_parent (priv->slider, GTK_WIDGET (self));
|
||||
|
||||
gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
|
||||
|
Loading…
Reference in New Issue
Block a user