mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
this macro computes the spacing from klass->scrollbar_spacing now. adapted
* 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
This commit is contained in:
parent
104f72cf95
commit
ee489eafb0
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -53,6 +53,8 @@ struct _GtkScrolledWindow
|
||||
struct _GtkScrolledWindowClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
|
||||
gint scrollbar_spacing;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user