fix for thumbs minimum size crash
This commit is contained in:
parent
2fb9215c74
commit
d49f836dd9
@ -265,14 +265,18 @@ void ThumbBrowserEntryBase::resize (int h) {
|
|||||||
|
|
||||||
// calculate the height remaining for the thumbnail image
|
// calculate the height remaining for the thumbnail image
|
||||||
preh = height - upperMargin - 2*borderWidth - lowerMargin - bsh;
|
preh = height - upperMargin - 2*borderWidth - lowerMargin - bsh;
|
||||||
int infow, infoh;
|
int infow=0;
|
||||||
|
int infoh=0;
|
||||||
if (options.showFileNames && !options.overlayedFileNames) {
|
if (options.showFileNames && !options.overlayedFileNames) {
|
||||||
// dimensions of the info text
|
// dimensions of the info text
|
||||||
getTextSizes (infow, infoh);
|
getTextSizes (infow, infoh);
|
||||||
preh -= infoh + textGap;
|
infoh += textGap;
|
||||||
|
preh -= infoh;
|
||||||
// If the text size was selected very high in preferences this may go negative
|
}
|
||||||
if (preh<0) preh=30;
|
// Minimum size for thumbs
|
||||||
|
if (preh<24){
|
||||||
|
preh=24;
|
||||||
|
height = preh + (upperMargin + 2*borderWidth + lowerMargin)+ bsh + infoh;
|
||||||
}
|
}
|
||||||
|
|
||||||
calcThumbnailSize ();
|
calcThumbnailSize ();
|
||||||
@ -281,9 +285,9 @@ void ThumbBrowserEntryBase::resize (int h) {
|
|||||||
width = prew + 2*sideMargin + 2*borderWidth;
|
width = prew + 2*sideMargin + 2*borderWidth;
|
||||||
if (width<infow + 2*sideMargin + 2*borderWidth)
|
if (width<infow + 2*sideMargin + 2*borderWidth)
|
||||||
width = infow + 2*sideMargin + 2*borderWidth;
|
width = infow + 2*sideMargin + 2*borderWidth;
|
||||||
|
}
|
||||||
if (width < bsw + 2*sideMargin + 2*borderWidth)
|
if (width < bsw + 2*sideMargin + 2*borderWidth)
|
||||||
width = bsw + 2*sideMargin + 2*borderWidth;
|
width = bsw + 2*sideMargin + 2*borderWidth;
|
||||||
}
|
|
||||||
|
|
||||||
if ( preh == old_preh )
|
if ( preh == old_preh )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user