From 2a4c97f3b3d211dbd4e8edda3208960c25b4644d Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 25 Feb 1999 14:08:50 +0000 Subject: [PATCH] still request the extra width or height if the corresponding scrollbar is Thu Feb 25 13:38:38 1999 Tim Janik * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still request the extra width or height if the corresponding scrollbar is already visible (the change from 09:50 needs to apply to policy == GTK_POLICY_AUTOMATIC only). --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkscrolledwindow.c | 8 ++++---- 8 files changed, 53 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f35f030de5..a4526722a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f35f030de5..a4526722a9 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f35f030de5..a4526722a9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f35f030de5..a4526722a9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f35f030de5..a4526722a9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f35f030de5..a4526722a9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f35f030de5..a4526722a9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Thu Feb 25 13:38:38 1999 Tim Janik + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): still + request the extra width or height if the corresponding scrollbar is + already visible (the change from 09:50 needs to apply to policy == + GTK_POLICY_AUTOMATIC only). + Thu Feb 25 11:27:36 1999 Tim Janik * TODO: updates, i left the text widget related portions in there, diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index f230be53f9..c77cb3f630 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -652,19 +652,19 @@ gtk_scrolled_window_size_request (GtkWidget *widget, } } - if ((scrolled_window->hscrollbar_policy == GTK_POLICY_AUTOMATIC) || + if (scrolled_window->hscrollbar_policy == GTK_POLICY_AUTOMATIC || GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar)) { requisition->width = MAX (requisition->width, hscrollbar_requisition.width); - if (!extra_height) + if (!extra_height || GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar)) extra_height = SCROLLBAR_SPACING (scrolled_window) + hscrollbar_requisition.height; } - if ((scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC) || + if (scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC || GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar)) { requisition->height = MAX (requisition->height, vscrollbar_requisition.height); - if (!extra_width) + if (!extra_width || GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar)) extra_width = SCROLLBAR_SPACING (scrolled_window) + vscrollbar_requisition.width; }