summaryrefslogtreecommitdiff
path: root/src/Gtk/Widgets.icl
diff options
context:
space:
mode:
authorCamil Staps2019-10-27 14:41:08 +0100
committerCamil Staps2019-10-27 14:41:08 +0100
commit7afd5796929601b10d52fc024b3cfd9ed64f25af (patch)
treede6c6f6e04a666e2a26a50d75dbff2f711b7ace3 /src/Gtk/Widgets.icl
parentAdd newMessageDialog; add GtkTitle type and instance tune w GtkTitle | gtkWin... (diff)
Add GtkScrollbarPolicy and instance tune GtkScrolledWindow (GtkScrollbarPolicy, GtkScrollbarPolicy)
Diffstat (limited to 'src/Gtk/Widgets.icl')
-rw-r--r--src/Gtk/Widgets.icl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Gtk/Widgets.icl b/src/Gtk/Widgets.icl
index ba0cb16..f2c942f 100644
--- a/src/Gtk/Widgets.icl
+++ b/src/Gtk/Widgets.icl
@@ -224,6 +224,12 @@ instance gtkContainer GtkScrolledWindow where gtkContainer sw = sw
newScrolledWindow :: GtkM GtkScrolledWindow
newScrolledWindow = toStateR (gtk_scrolled_window_new 0 0) >>= show
+instance tune GtkScrolledWindow (GtkScrollbarPolicy, GtkScrollbarPolicy)
+where
+ tune (hp,vp) window =
+ toState (gtk_scrolled_window_set_policy window (toInt hp) (toInt vp)) >>|
+ pure window
+
:: GtkSeparator :== Pointer
instance gtkWidget GtkSeparator where gtkWidget s = s