Tracker: Fix draggable folder icon size computation.

Should fix #17906, but I could not reproduce it, so I was unable
to confirm this fixes the problem.
This commit is contained in:
Augustin Cavalier
2022-09-09 16:06:32 -04:00
parent 95ca8eefea
commit a0b9c84fe0
+5 -4
View File
@@ -3418,12 +3418,13 @@ BContainerWindow::_AddFolderIcon()
return; return;
} }
float iconSize = fMenuBar->Bounds().Height() - 2; float baseIconSize = be_control_look->ComposeIconSize(16).Height() + 1,
if (iconSize < 16) iconSize = fMenuBar->Bounds().Height() - 2;
iconSize = 16; if (iconSize < baseIconSize)
iconSize = baseIconSize;
fDraggableIcon = new(std::nothrow) fDraggableIcon = new(std::nothrow)
DraggableContainerIcon(be_control_look->ComposeIconSize(iconSize)); DraggableContainerIcon(BSize(iconSize - 1, iconSize - 1));
if (fDraggableIcon != NULL) { if (fDraggableIcon != NULL) {
fMenuContainer->GroupLayout()->AddView(fDraggableIcon); fMenuContainer->GroupLayout()->AddView(fDraggableIcon);
fMenuBar->SetBorders( fMenuBar->SetBorders(