From b7abad288ee6d5d492230ca00d026d315d473b4a Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 30 Sep 2011 10:31:08 +0000 Subject: 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 --- src/Fl_Text_Display.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 && (mWrapMarginPixvisible() && !wrap_at_bounds) { mHScrollBar->set_visible(); again = 1; // loop again to see if we now need vert. & recalc sizes -- cgit v1.2.3