Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
Tue Dec 23 03:03:17 1997 Tim Janik <timj@psynet.net>
+ * gtk/gtkscrolledwindow.c (SCROLLBAR_SPACING): this macro computes
+ the spacing from klass->scrollbar_spacing now. adapted all functions
+ that used this macro (based on a patch from Patrice Fortier).
+ * gtk/gtkscrolledwindow.h (struct _GtkScrolledWindowClass): added
+ scrollbar_spacing to substitute a define (patch from Patrice Fortier).
+
* gtk/gtkrc.h (gtk_rc_parse_string): new function.
* gtk/gtkrc.c: many functions adapted to use GScanner for scanning.
(gtk_rc_parse): use gtk_rc_parse_any for parsing.
#include "gtksignal.h"
-#define SCROLLBAR_SPACING 5
+#define SCROLLBAR_SPACING(w) (GTK_SCROLLED_WINDOW_CLASS (GTK_OBJECT (w)->klass)->scrollbar_spacing)
static void gtk_scrolled_window_class_init (GtkScrolledWindowClass *klass);
&scrolled_window->hscrollbar->requisition);
requisition->width = MAX (requisition->width, scrolled_window->hscrollbar->requisition.width);
- extra_height = SCROLLBAR_SPACING + scrolled_window->hscrollbar->requisition.height;
+ extra_height = SCROLLBAR_SPACING (scrolled_window) + scrolled_window->hscrollbar->requisition.height;
}
if ((scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC) ||
&scrolled_window->vscrollbar->requisition);
requisition->height = MAX (requisition->height, scrolled_window->vscrollbar->requisition.height);
- extra_width = SCROLLBAR_SPACING + scrolled_window->vscrollbar->requisition.width;
+ extra_width = SCROLLBAR_SPACING (scrolled_window) + scrolled_window->vscrollbar->requisition.width;
}
requisition->width += GTK_CONTAINER (widget)->border_width * 2 + extra_width;
if (GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
{
child_allocation.x = viewport_allocation.x;
- child_allocation.y = viewport_allocation.y + viewport_allocation.height + SCROLLBAR_SPACING;
+ child_allocation.y = viewport_allocation.y + viewport_allocation.height + SCROLLBAR_SPACING (scrolled_window);
child_allocation.width = viewport_allocation.width;
child_allocation.height = scrolled_window->hscrollbar->requisition.height;
child_allocation.x += allocation->x;
if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
{
- child_allocation.x = viewport_allocation.x + viewport_allocation.width + SCROLLBAR_SPACING;
+ child_allocation.x = viewport_allocation.x + viewport_allocation.width + SCROLLBAR_SPACING (scrolled_window);
child_allocation.y = viewport_allocation.y;
child_allocation.width = scrolled_window->vscrollbar->requisition.width;
child_allocation.height = viewport_allocation.height;
allocation->height = widget->allocation.height - allocation->y * 2;
if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
- allocation->width -= scrolled_window->vscrollbar->requisition.width + SCROLLBAR_SPACING;
+ allocation->width -= scrolled_window->vscrollbar->requisition.width + SCROLLBAR_SPACING (scrolled_window);
if (GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
- allocation->height -= scrolled_window->hscrollbar->requisition.height + SCROLLBAR_SPACING;
+ allocation->height -= scrolled_window->hscrollbar->requisition.height + SCROLLBAR_SPACING (scrolled_window);
}
static void
struct _GtkScrolledWindowClass
{
GtkContainerClass parent_class;
+
+ gint scrollbar_spacing;
};