[gtk+] switch: Use a gizmo as slider
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] switch: Use a gizmo as slider
- Date: Thu, 20 Jul 2017 01:44:27 +0000 (UTC)
commit 071c205c92cf395eddb3bb63b951baf81539fca2
Author: Timm Bäder <mail baedert org>
Date: Fri May 19 14:41:45 2017 +0200
switch: Use a gizmo as slider
The button was jut a stop-gap solution before GtkGizmo existed.
gtk/gtkswitch.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 1824191..884163a 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]