From a4eeb66145c114cff4d75300c7995a6f8b370b2f Mon Sep 17 00:00:00 2001 From: Christian-Kr Date: Mon, 19 Jun 2023 19:05:42 +0200 Subject: [PATCH 1/2] Set dummy width and height for ThumbBrowserEntry, cause height will be used to calculate the height of the scroll pane. Positions also need to be set as a dummy, cause no method allows only width or height. --- rtgui/thumbbrowserbase.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 8f3499c2a..62c8a56bd 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -781,6 +781,7 @@ void ThumbBrowserBase::arrangeFiles(ThumbBrowserEntryBase* entry) for (int i = 0; ct < fd.size() && i < numOfCols; ++i, ++ct) { for (; ct < fd.size() && fd[ct]->filtered; ++ct) { + fd[ct]->setPosition(0, 0, colWidths[i], rowHeight); fd[ct]->drawable = false; } From 0507b0a26a16b0aec63b79186c0ac3e21121f01f Mon Sep 17 00:00:00 2001 From: Christian-Kr Date: Sun, 25 Jun 2023 06:50:13 +0200 Subject: [PATCH 2/2] Add a comment why setting the position of a not drawn thumb is needed here. --- rtgui/thumbbrowserbase.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 62c8a56bd..f697d6648 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -781,7 +781,11 @@ void ThumbBrowserBase::arrangeFiles(ThumbBrowserEntryBase* entry) for (int i = 0; ct < fd.size() && i < numOfCols; ++i, ++ct) { for (; ct < fd.size() && fd[ct]->filtered; ++ct) { + // Thumbs that are not going be drawn should also have a minimum height and width. Cause + // the properties might be used in other parts of the code. The position is just set to be + // zero as a default. fd[ct]->setPosition(0, 0, colWidths[i], rowHeight); + fd[ct]->drawable = false; }