diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2011-09-30 10:31:08 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2011-09-30 10:31:08 +0000 |
| commit | b7abad288ee6d5d492230ca00d026d315d473b4a (patch) | |
| tree | e5eb011426a12b673c813c321ea8c6df15e51f3f | |
| parent | 7446a4d5bb9bd77e3dbdcb16d0292fd44aa18dff (diff) | |
Horizontal Scrollbar in TextDisplay is now even smarter.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_Text_Display.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 05a9eb60b..fb02fab70 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -342,7 +342,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { // figure the scrollbars if (scrollbar_width()) { /* Decide if the vertical scrollbar needs to be visible */ - int vbvis = mVScrollBar->visible(); + uchar vbvis = mVScrollBar->visible(); if (scrollbar_align() & (FL_ALIGN_LEFT|FL_ALIGN_RIGHT) && mNBufferLines >= mNVisibleLines - 1) { @@ -386,7 +386,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { if (scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM) && (mVScrollBar->visible() || longest_vline() > text_area.w)) { - char wrap_at_bounds = mContinuousWrap && (mWrapMarginPix==0); + char wrap_at_bounds = mContinuousWrap && (mWrapMarginPix<text_area.w); if (!mHScrollBar->visible() && !wrap_at_bounds) { mHScrollBar->set_visible(); again = 1; // loop again to see if we now need vert. & recalc sizes |
