lyxerr[Debug::GUI] << "text_height now " << text_height << endl;
lyxerr[Debug::GUI] << "work_height " << work_height << endl;
lyxerr[Debug::GUI] << "text_height now " << text_height << endl;
lyxerr[Debug::GUI] << "work_height " << work_height << endl;
/* If the text is smaller than the working area, the scrollbar
* maximum must be the working area height. No scrolling will
* be possible */
/* If the text is smaller than the working area, the scrollbar
* maximum must be the working area height. No scrolling will
* be possible */
void BufferView::Pimpl::scrollCB(double value)
{
lyxerr[Debug::GUI] << "scrollCB of " << value << endl;
void BufferView::Pimpl::scrollCB(double value)
{
lyxerr[Debug::GUI] << "scrollCB of " << value << endl;
if (!buffer_) return;
current_scrollbar_value = long(value);
if (!buffer_) return;
current_scrollbar_value = long(value);
static_cast<int>(text->first_y + owner.height()))-offset;
int const top = min(max(top_tmp, text->first_y),
static_cast<int>(text->first_y + owner.height()))-offset;
static_cast<int>(text->first_y + owner.height()))-offset;
int const top = min(max(top_tmp, text->first_y),
static_cast<int>(text->first_y + owner.height()))-offset;
drawFromTo(text, bv, top - text->first_y,
bottom - text->first_y, y_offset,
x_offset);
drawFromTo(text, bv, top - text->first_y,
bottom - text->first_y, y_offset,
x_offset);