Commit 6a82d4c6 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Add a scrollbar_spacing style property (#81396, based on a patch from

Sun Oct 20 14:58:02 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
        Add a scrollbar_spacing style property (#81396, based
        on a patch from Anders Carlsson)
parent 6117885c
Sun Oct 20 14:58:02 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
Add a scrollbar_spacing style property (#81396, based
on a patch from Anders Carlsson)
2002-10-19 Jeremy Katz <katzj@redhat.com>
* configure.in: make configure checks for Xrandr and Xinerama
......
Sun Oct 20 14:58:02 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
Add a scrollbar_spacing style property (#81396, based
on a patch from Anders Carlsson)
2002-10-19 Jeremy Katz <katzj@redhat.com>
* configure.in: make configure checks for Xrandr and Xinerama
......
Sun Oct 20 14:58:02 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
Add a scrollbar_spacing style property (#81396, based
on a patch from Anders Carlsson)
2002-10-19 Jeremy Katz <katzj@redhat.com>
* configure.in: make configure checks for Xrandr and Xinerama
......
Sun Oct 20 14:58:02 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
Add a scrollbar_spacing style property (#81396, based
on a patch from Anders Carlsson)
2002-10-19 Jeremy Katz <katzj@redhat.com>
* configure.in: make configure checks for Xrandr and Xinerama
......
Sun Oct 20 14:58:02 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
Add a scrollbar_spacing style property (#81396, based
on a patch from Anders Carlsson)
2002-10-19 Jeremy Katz <katzj@redhat.com>
* configure.in: make configure checks for Xrandr and Xinerama
......
Sun Oct 20 14:58:02 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
Add a scrollbar_spacing style property (#81396, based
on a patch from Anders Carlsson)
2002-10-19 Jeremy Katz <katzj@redhat.com>
* configure.in: make configure checks for Xrandr and Xinerama
......
......@@ -277,6 +277,15 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
GTK_SHADOW_NONE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("scrollbar_spacing",
_("Scrollbar spacing"),
_("Number of pixels between the scrollbars and the scrolled window"),
0,
G_MAXINT,
DEFAULT_SCROLLBAR_SPACING,
G_PARAM_READABLE));
signals[SCROLL_CHILD] =
g_signal_new ("scroll_child",
G_TYPE_FROM_CLASS (object_class),
......@@ -1384,6 +1393,16 @@ _gtk_scrolled_window_get_scrollbar_spacing (GtkScrolledWindow *scrolled_window)
class = GTK_SCROLLED_WINDOW_GET_CLASS (scrolled_window);
return class->scrollbar_spacing >= 0 ? class->scrollbar_spacing : DEFAULT_SCROLLBAR_SPACING;
}
if (class->scrollbar_spacing >= 0)
return class->scrollbar_spacing;
else
{
gint scrollbar_spacing;
gtk_widget_style_get (GTK_WIDGET (scrolled_window),
"scrollbar_spacing", &scrollbar_spacing,
NULL);
return scrollbar_spacing;
}
}
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