diff options
| author | nyamatongwe <unknown> | 2006-01-26 01:35:23 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2006-01-26 01:35:23 +0000 | 
| commit | dbc7f873b15cbded2b16656b4f561d88fd081478 (patch) | |
| tree | ad5c53046eefbf8b3d2449202bcd2aac932690e8 | |
| parent | 868ce73d35bf04d9c7653ab7dab8223889a78971 (diff) | |
| download | scintilla-mirror-dbc7f873b15cbded2b16656b4f561d88fd081478.tar.gz | |
Patch from John Ehresman to correctly allocate the text display area when
the vertical scroll bar is hidden.  It also hides the scroll bar widgets
themselves.
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index c6b0fbf3e..c6f5ab1c5 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1664,31 +1664,29 @@ void ScintillaGTK::Resize(int width, int height) {  		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.x = width - scrollBarWidth; +		alloc.y = 0;  		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();  	} @@ -1698,7 +1696,9 @@ void ScintillaGTK::Resize(int width, int height) {  	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);  } | 
