diff options
author | nyamatongwe <unknown> | 2000-04-18 13:27:37 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2000-04-18 13:27:37 +0000 |
commit | 77d9acaa4bf506488ffac973efcb3dc2fe559e81 (patch) | |
tree | 7161c54aa416443e66047531fa6361cb3e14382b | |
parent | 6e0886a5056dea51dda45684f5753569e2723daa (diff) | |
download | scintilla-mirror-77d9acaa4bf506488ffac973efcb3dc2fe559e81.tar.gz |
Horizontal scroll bar disabling.
Fixed makefile for GTK+.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 24 | ||||
-rw-r--r-- | gtk/makefile | 2 |
2 files changed, 21 insertions, 5 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 77b308e1f..65b8023d5 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -69,6 +69,7 @@ private: virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); virtual bool ModifyScrollBars(int nMax, int nPage); + void ScintillaGTK::ReconfigureScrollBars(); virtual void NotifyChange(); virtual void NotifyFocus(bool focus); virtual void NotifyParent(SCNotification scn); @@ -446,6 +447,11 @@ bool ScintillaGTK::ModifyScrollBars(int nMax, int nPage) { return modified; } +void ScintillaGTK::ReconfigureScrollBars() { + PRectangle rc = wMain.GetClientPosition(); + Resize(rc.Width(), rc.Height()); +} + void ScintillaGTK::NotifyChange() { gtk_signal_emit(GTK_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], MAKELONG(ctrlID, EN_CHANGE), wMain.GetID()); @@ -644,16 +650,26 @@ void ScintillaGTK::Resize(int width, int height) { // These allocations should never produce negative sizes as they would wrap around to huge // unsigned numbers inside GTK+ causing warnings. + int horizontalScrollBarHeight = scrollBarWidth; + if (!horizontalScrollBarVisible) + horizontalScrollBarHeight = 0; + alloc.x = 0; alloc.y = 0; alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1; - alloc.height = Platform::Maximum(1, height - scrollBarHeight) + 1; + alloc.height = Platform::Maximum(1, height - horizontalScrollBarHeight) + 1; gtk_widget_size_allocate(GTK_WIDGET(wDraw.GetID()), &alloc); alloc.x = 0; - alloc.y = height - scrollBarHeight + 1; - alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1; - alloc.height = scrollBarHeight; + if (horizontalScrollBarVisible) { + alloc.y = height - scrollBarHeight + 1; + alloc.width = Platform::Maximum(1, width - scrollBarWidth) + 1; + alloc.height = horizontalScrollBarHeight; + } else { + alloc.y = height ; + alloc.width = 0; + alloc.height = 0; + } gtk_widget_size_allocate(GTK_WIDGET(scrollbarh.GetID()), &alloc); alloc.x = width - scrollBarWidth + 1; diff --git a/gtk/makefile b/gtk/makefile index 934edbf82..140697767 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -39,7 +39,7 @@ CellBuffer.o: CellBuffer.cxx Platform.h Scintilla.h WinDefs.h \ ContractionState.o: ContractionState.cxx Platform.h ContractionState.h Document.o: Document.cxx Platform.h Scintilla.h WinDefs.h CellBuffer.h \ Document.h -DocumentAccessor.o: Accessor.cxx Platform.h PropSet.h Accessor.h \ +DocumentAccessor.o: DocumentAccessor.cxx Platform.h PropSet.h Accessor.h \ DocumentAccessor.h Scintilla.h WinDefs.h Editor.o: Editor.cxx Platform.h Scintilla.h WinDefs.h \ ContractionState.h CellBuffer.h KeyMap.h Indicator.h LineMarker.h \ |