diff options
author | nyamatongwe <unknown> | 2003-04-08 13:10:34 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-04-08 13:10:34 +0000 |
commit | f814ef6056d4d663772b3bfa0cad6e5b4aefb1b5 (patch) | |
tree | 311f47b045d268413eab00619d86b2523f698776 | |
parent | d91d55b62c8a6a56c9e08b58db81639c756b92b6 (diff) | |
download | scintilla-mirror-f814ef6056d4d663772b3bfa0cad6e5b4aefb1b5.tar.gz |
Beter attempt at drawing corner between scrollbars. Still fails but doesn't
overdraw vertical scroll bar when horizontal scroll bar turned off.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 70b790c80..1ce0ba526 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1160,10 +1160,10 @@ 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. bool showSBHorizontal = horizontalScrollBarVisible && (wrapState == eWrapNone); - int horizontalScrollBarHeight = scrollBarWidth; + int horizontalScrollBarHeight = scrollBarHeight; if (!showSBHorizontal) horizontalScrollBarHeight = 0; - int verticalScrollBarHeight = scrollBarHeight; + int verticalScrollBarHeight = scrollBarWidth; if (!verticalScrollBarVisible) verticalScrollBarHeight = 0; @@ -1573,14 +1573,19 @@ gint ScintillaGTK::Expose(GtkWidget *, GdkEventExpose *ose) { Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { surfaceWindow->Init(PWidget(wMain)->window, PWidget(wMain)); + // Fill the corner between the scrollbars - PRectangle rcCorner = wMain.GetClientPosition(); - if (verticalScrollBarVisible) - rcCorner.left = rcCorner.right - scrollBarWidth + 1; - if (horizontalScrollBarVisible && (wrapState == eWrapNone)) - rcCorner.top = rcCorner.bottom - scrollBarHeight + 1; - surfaceWindow->FillRectangle(rcCorner, - vs.styles[STYLE_LINENUMBER].back.allocated); + if (verticalScrollBarVisible) { + if (horizontalScrollBarVisible && (wrapState == eWrapNone)) { + PRectangle rcCorner = wMain.GetClientPosition(); + rcCorner.left = rcCorner.right - scrollBarWidth + 1; + rcCorner.top = rcCorner.bottom - scrollBarHeight + 1; + //fprintf(stderr, "Corner %0d,%0d %0d,%0d\n", + //rcCorner.left, rcCorner.top, rcCorner.right, rcCorner.bottom); + surfaceWindow->FillRectangle(rcCorner, + vs.styles[STYLE_LINENUMBER].back.allocated); + } + } Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); |