changeset 525:77fb0aa0e69f

[xemacs-hg @ 2001-05-09 14:31:52 by wmperry] Fix disappearing GTK scrollbar problem...
author wmperry
date Wed, 09 May 2001 14:31:56 +0000
parents 1f4790508db6
children a5ee2ca8672c
files src/ChangeLog src/scrollbar-gtk.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed May 09 13:46:55 2001 +0000
+++ b/src/ChangeLog	Wed May 09 14:31:56 2001 +0000
@@ -1,3 +1,8 @@
+2001-05-09  William M. Perry  <wmperry@gnu.org>
+
+	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Fix the
+	disappearing GTK scrollbar problem.
+
 2001-05-09  Ben Wing  <ben@xemacs.org>
 
 	* regex.c (regex_compile):
--- a/src/scrollbar-gtk.c	Wed May 09 13:46:55 2001 +0000
+++ b/src/scrollbar-gtk.c	Wed May 09 14:31:56 2001 +0000
@@ -114,6 +114,22 @@
 		      GTK_SIGNAL_FUNC (scrollbar_drag_hack_cb), (gpointer) 0);
 
   gtk_fixed_put (GTK_FIXED (FRAME_GTK_TEXT_WIDGET (f)), SCROLLBAR_GTK_WIDGET (instance), 0, 0);
+
+#if GTK_CHECK_VERSION(1,2,9)
+  /*
+  ** With gtk version > 1.2.8 the scrollbars in gtk-xemacs and xemacs
+  ** from CVS are invisible. In fact they are not invisible but very
+  ** thin (0 pixels wide). This is so, because the new gtk code does
+  ** not call gtk_widget_request_size() on the newly created
+  ** scrollbars anymore. this change was done to allow the theme
+  ** engines to manipulate the scrollbar width. This patch calls
+  ** gtk_widget_request_size with the newly created scollbars. Maybe
+  ** it is better to postpone this call just before the
+  ** gtk_widget_show() call is done on the scrolbar.
+  */
+  gtk_widget_size_request(GTK_WIDGET(sb), &(GTK_WIDGET(sb)->requisition));
+#endif
+
   gtk_widget_hide (SCROLLBAR_GTK_WIDGET (instance));
 }