diff options
| author | nyamatongwe <unknown> | 2002-09-19 01:59:37 +0000 |
|---|---|---|
| committer | nyamatongwe <unknown> | 2002-09-19 01:59:37 +0000 |
| commit | 6d3e227726ab559686fdf97d8eee798fa25125b0 (patch) | |
| tree | caa852ee0c958f923a7f8057bbfc339ac1eac563 /gtk/ScintillaGTK.cxx | |
| parent | 792c0835740b1962235085176624512cdac0e566 (diff) | |
| download | scintilla-mirror-6d3e227726ab559686fdf97d8eee798fa25125b0.tar.gz | |
Added mthod to turn off vertical scroll bar.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 472160994..1e67e44be 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -639,7 +639,8 @@ void ScintillaGTK::FullPaint() { PRectangle ScintillaGTK::GetClientRectangle() { PRectangle rc = wMain.GetClientPosition(); - rc.right -= scrollBarWidth + 1; + if (verticalScrollBarVisible) + rc.right -= scrollBarWidth + 1; if (horizontalScrollBarVisible) rc.bottom -= scrollBarHeight + 1; // Move to origin @@ -1085,6 +1086,9 @@ void ScintillaGTK::Resize(int width, int height) { int horizontalScrollBarHeight = scrollBarWidth; if (!horizontalScrollBarVisible) horizontalScrollBarHeight = 0; + int verticalScrollBarHeight = scrollBarHeight; + if (!verticalScrollBarVisible) + verticalScrollBarHeight = 0; GtkAllocation alloc; alloc.x = 0; @@ -1099,10 +1103,16 @@ void ScintillaGTK::Resize(int width, int height) { } gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarh)), &alloc); - alloc.x = width - scrollBarWidth; alloc.y = 0; - alloc.width = scrollBarWidth; - alloc.height = Platform::Maximum(1, height - scrollBarHeight) + 1; + if (verticalScrollBarVisible) { + alloc.x = width - scrollBarWidth; + alloc.width = scrollBarWidth; + alloc.height = Platform::Maximum(1, height - scrollBarHeight) + 1; + } else { + alloc.x = width; + alloc.width = 0; + alloc.height = 0; + } gtk_widget_size_allocate(GTK_WIDGET(PWidget(scrollbarv)), &alloc); ChangeSize(); |
