Author: matt
Date: 2011-09-30 03:31:08 -0700 (Fri, 30 Sep 2011)
New Revision: 9097
Log:
Horizontal Scrollbar in TextDisplay is now even smarter.

Modified:
   branches/branch-1.3/src/Fl_Text_Display.cxx

Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2011-09-30 10:30:55 UTC (rev 
9096)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2011-09-30 10:31:08 UTC (rev 
9097)
@@ -342,7 +342,7 @@
     // 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 @@
       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

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to