]> Pileus Git - ~andy/gtk/commitdiff
this macro computes the spacing from klass->scrollbar_spacing now. adapted
authorTim Janik <timj@src.gnome.org>
Tue, 23 Dec 1997 20:13:14 +0000 (20:13 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 23 Dec 1997 20:13:14 +0000 (20:13 +0000)
        * 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).
-timj

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkscrolledwindow.c
gtk/gtkscrolledwindow.h

index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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.
index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
@@ -1,5 +1,11 @@
 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.
index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
@@ -1,5 +1,11 @@
 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.
index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
@@ -1,5 +1,11 @@
 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.
index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
@@ -1,5 +1,11 @@
 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.
index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
@@ -1,5 +1,11 @@
 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.
index 3b1466863f2fb9e21f0764d6802f51b313fc6601..7111f2a41cc6af8b1426114ad6e55f2417aebae2 100644 (file)
@@ -1,5 +1,11 @@
 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.
index 79cc67aaf6d3f3fa8be407c307791081804c98e1..8c1c9dc39615a7f15865872403475f06e6113108 100644 (file)
@@ -19,7 +19,7 @@
 #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);
@@ -310,7 +310,7 @@ gtk_scrolled_window_size_request (GtkWidget      *widget,
                               &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) ||
@@ -320,7 +320,7 @@ gtk_scrolled_window_size_request (GtkWidget      *widget,
                               &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;
@@ -369,7 +369,7 @@ gtk_scrolled_window_size_allocate (GtkWidget     *widget,
   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;
@@ -380,7 +380,7 @@ gtk_scrolled_window_size_allocate (GtkWidget     *widget,
 
   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;
@@ -454,9 +454,9 @@ gtk_scrolled_window_viewport_allocate (GtkWidget     *widget,
   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
index 34a01ef6cfcd54eb00b658e9518955cd92790aa7..54ed5637e78282c3f25f8aeac641e04f85535d06 100644 (file)
@@ -53,6 +53,8 @@ struct _GtkScrolledWindow
 struct _GtkScrolledWindowClass
 {
   GtkContainerClass parent_class;
+
+  gint scrollbar_spacing;
 };