Commit 4455266c authored by Matthias Clasen's avatar Matthias Clasen

GtkScrolledWindow: Add overlay scrollbars

This commit adds a mode to GtkScrolledWindow in which it puts
narrow, auto-hiding scrollbars over the content, instead of
allocating room for the scrollbars outside of the content. We
use traditional scrollbars if we find a mouse or if overlay
scrolling has explicitly turned off.

For test purposes, GTK_TEST_TOUCHSCREEN can be used to get
overlay scrolling even in the presence of a mouse. The
environment variable GTK_OVERLAY_SCROLLING can also be used
to force overlay scrolling on or off.
parent 05ab0f22
This diff is collapsed.
......@@ -197,16 +197,22 @@ GDK_AVAILABLE_IN_ALL
void gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window,
gint height);
GDK_AVAILABLE_IN_3_4
void gtk_scrolled_window_set_kinetic_scrolling (GtkScrolledWindow *scrolled_window,
gboolean kinetic_scrolling);
void gtk_scrolled_window_set_kinetic_scrolling (GtkScrolledWindow *scrolled_window,
gboolean kinetic_scrolling);
GDK_AVAILABLE_IN_3_4
gboolean gtk_scrolled_window_get_kinetic_scrolling (GtkScrolledWindow *scrolled_window);
gboolean gtk_scrolled_window_get_kinetic_scrolling (GtkScrolledWindow *scrolled_window);
GDK_AVAILABLE_IN_3_4
void gtk_scrolled_window_set_capture_button_press (GtkScrolledWindow *scrolled_window,
gboolean capture_button_press);
void gtk_scrolled_window_set_capture_button_press (GtkScrolledWindow *scrolled_window,
gboolean capture_button_press);
GDK_AVAILABLE_IN_3_4
gboolean gtk_scrolled_window_get_capture_button_press (GtkScrolledWindow *scrolled_window);
gboolean gtk_scrolled_window_get_capture_button_press (GtkScrolledWindow *scrolled_window);
GDK_AVAILABLE_IN_3_16
void gtk_scrolled_window_set_overlay_scrolling (GtkScrolledWindow *scrolled_window,
gboolean overlay_scrolling);
GDK_AVAILABLE_IN_3_16
gboolean gtk_scrolled_window_get_overlay_scrolling (GtkScrolledWindow *scrolled_window);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment