fixes wokspaces grid

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16897 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-03-27 19:26:38 +00:00
parent 306e92084c
commit ae89492b27

View File

@ -43,7 +43,7 @@ WorkspacesLayer::_GetGrid(int32& columns, int32& rows)
int32 count = settings.WorkspacesCount();
rows = 1;
for (int32 i = 2; i < count; i++) {
for (int32 i = 2; i <= sqrt(count); i++) {
if (count % i == 0)
rows = i;
}