diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2011-09-30 10:20:09 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2011-09-30 10:20:09 +0000 |
| commit | 7446a4d5bb9bd77e3dbdcb16d0292fd44aa18dff (patch) | |
| tree | c41a217b588e2b1983dbaf97da65c4029a39e116 /src | |
| parent | 41876bf00a4a17c5da6188894bdb51b1bdd16c55 (diff) | |
Text area width needs to be recalculated if vertical scrollbar changes visibility.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index a7d315e69..05a9eb60b 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -295,6 +295,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { text_area.y = Y+TOP_MARGIN; text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN; text_area.h = H-TOP_MARGIN-BOTTOM_MARGIN; + const int oldTAWidth = text_area.w; int i; /* Find the new maximum font height for this text display */ @@ -341,6 +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(); if (scrollbar_align() & (FL_ALIGN_LEFT|FL_ALIGN_RIGHT) && mNBufferLines >= mNVisibleLines - 1) { @@ -357,6 +359,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } } + if (vbvis != mVScrollBar->visible()) again = 1; /* Decide if the horizontal scrollbar needs to be visible. If the text |
