Fix FileList items size in list mode when the vertical scroll bar is hidden

This commit is contained in:
David Capello 2019-03-26 09:25:58 -03:00
parent 5acadc69ca
commit ce27188852

View File

@ -663,8 +663,20 @@ void FileList::recalcAllFileItemInfo()
m_itemsPerRow = 1;
// Add the vertical scrollbar space
if (isListView()) {
if (view) {
view->updateView();
if (!view->verticalBar()->isVisible()) {
gfx::Rect vp = view->viewportBounds();
for (auto& info : m_info) {
info.bounds.w = vp.w;
}
}
}
}
// Redistribute items in X axis
if (isIconView()) {
else if (isIconView()) {
int maxWidth = 0;
int maxTextWidth = 0;
for (const auto& info : m_info) {