Sanity checks for height, horizontal thumb browser automatically scales.

This commit is contained in:
Thanatomanic
2018-07-01 15:52:21 +02:00
parent 3d7772d0c6
commit fc79968108
2 changed files with 4 additions and 3 deletions

View File

@@ -501,8 +501,8 @@ void ThumbBrowserBase::configScrollBars ()
vscroll.get_adjustment()->set_upper (inH);
hscroll.get_adjustment()->set_lower (0);
vscroll.get_adjustment()->set_lower (0);
hscroll.get_adjustment()->set_step_increment (fd[0]->getEffectiveHeight()); // Is it safe enough to assume fd[0] is accessible? There seems to be no other way to get the _actual_ height of the thumbnail.
vscroll.get_adjustment()->set_step_increment (fd[0]->getEffectiveHeight());
hscroll.get_adjustment()->set_step_increment (!fd.empty() ? fd[0]->getEffectiveHeight() : 0);
vscroll.get_adjustment()->set_step_increment (!fd.empty() ? fd[0]->getEffectiveHeight() : 0);
hscroll.get_adjustment()->set_page_increment (iw);
vscroll.get_adjustment()->set_page_increment (ih);
hscroll.get_adjustment()->set_page_size (iw);
@@ -567,7 +567,7 @@ void ThumbBrowserBase::arrangeFiles()
MYREADERLOCK_RELEASE(l);
// This will require a Writer access
resizeThumbnailArea(currx, rowHeight);
resizeThumbnailArea(currx, !fd.empty() ? fd[0]->getEffectiveHeight() : rowHeight);
} else {
const int availWidth = internal.get_width();