diff options
| author | Greg Ercolano <erco@seriss.com> | 2024-03-11 13:20:17 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2024-03-11 13:20:17 -0700 |
| commit | 38af0c823b6338637bccf7d0b70c88d3a861fe6a (patch) | |
| tree | a7b3766ea698d2073f96f16abb70cc9ef46bbc94 /src/Fl_Terminal.cxx | |
| parent | b1910ccfff81a1d8bc6a6126257d284d94e7f879 (diff) | |
Add Fl_Terminal to "Scrollbar Size" unittest (#931)
This involved enlarging the unittest main window to make room
for the additional test.
Adding this test revealed a problem in Fl_Terminal's global
scrollbar size handling, which is fixed here as well.
Also fixed a small issue in the demo's debugging terminal
with the horiz scrollbar.
Diffstat (limited to 'src/Fl_Terminal.cxx')
| -rw-r--r-- | src/Fl_Terminal.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Fl_Terminal.cxx b/src/Fl_Terminal.cxx index 2cd99e993..566cb0820 100644 --- a/src/Fl_Terminal.cxx +++ b/src/Fl_Terminal.cxx @@ -3657,6 +3657,12 @@ void Fl_Terminal::draw(void) { current_style_->update(); // do deferred update here update_screen(true); // update fonts } + // Detect if Fl::scrollbar_size() was changed in size, recalc if so + if (scrollbar_size_ == 0 && + ( scrollbar->visible() && scrollbar->w() != Fl::scrollbar_size() || + hscrollbar->visible() && hscrollbar->h() != Fl::scrollbar_size())) { + update_scrollbar(); + } // Draw group first, terminal last Fl_Group::draw(); // Draw that little square between the scrollbars: |
