Hi,
Attached is a patch that correctly allocates the wText display area when
the vertical scroll bar is hidden. It also hides the scroll bar widgets
themselves, which is not strictly needed but it seems cleaner to really
hide them.
John
Index: gtk/ScintillaGTK.cxx
===================================================================
RCS file: /home/cvs/src/ide/external/scintilla/gtk/ScintillaGTK.cxx,v
retrieving revision 1.44
diff -u -p -r1.44 ScintillaGTK.cxx
--- gtk/ScintillaGTK.cxx 24 Jan 2006 00:56:10 -0000 1.44
+++ gtk/ScintillaGTK.cxx 24 Jan 2006 21:52:04 -0000
@@ -1653,31 +1653,29 @@ void ScintillaGTK::Resize(int width, int
verticalScrollBarHeight = 0;
GtkAllocation alloc;
- alloc.x = 0;
if (showSBHorizontal) {
+ gtk_widget_show(GTK_WIDGET(PWidget(scrollbarh)));
+ alloc.x = 0;
alloc.y = height - scrollBarHeight;
alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1;
alloc.height = horizontalScrollBarHeight;
+ gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarh)),
&alloc);
} else {
- alloc.y = -scrollBarHeight;
- alloc.width = 0;
- alloc.height = 0;
+ gtk_widget_hide(GTK_WIDGET(PWidget(scrollbarh)));
}
- gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarh)), &alloc);
- alloc.y = 0;
if (verticalScrollBarVisible) {
+ gtk_widget_show(GTK_WIDGET(PWidget(scrollbarv)));
+ alloc.y = 0;
alloc.x = width - scrollBarWidth;
alloc.width = scrollBarWidth;
alloc.height = Platform::Maximum(1, height - scrollBarHeight) +
1;
if (!showSBHorizontal)
alloc.height += scrollBarWidth-1;
+ gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarv)),
&alloc);
} else {
- alloc.x = -scrollBarWidth;
- alloc.width = 0;
- alloc.height = 0;
+ gtk_widget_hide(GTK_WIDGET(PWidget(scrollbarv)));
}
- gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarv)), &alloc);
if (GTK_WIDGET_MAPPED(PWidget(wMain))) {
ChangeSize();
}
@@ -1687,7 +1685,9 @@ void ScintillaGTK::Resize(int width, int
alloc.width = Platform::Maximum(1, width - scrollBarWidth);
alloc.height = Platform::Maximum(1, height - scrollBarHeight);
if (!showSBHorizontal)
- alloc.height += scrollBarWidth;
+ alloc.height += scrollBarHeight;
+ if (!verticalScrollBarVisible)
+ alloc.width += scrollBarWidth;
gtk_widget_size_allocate(GTK_WIDGET(PWidget(wText)), &alloc);
}
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest