mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 09:36:43 +00:00
fixed several bugs in the layout algorithm of the toggle scene tool
This commit is contained in:
parent
507e5c4f6e
commit
612202a7a5
1 changed files with 4 additions and 4 deletions
|
@ -92,7 +92,7 @@ QRect CSVWidget::SceneToolToggle::getIconBox (int index) const
|
||||||
{
|
{
|
||||||
// space out icons vertically, if there aren't enough to populate all rows
|
// space out icons vertically, if there aren't enough to populate all rows
|
||||||
int diff = yMax - actualYIcons;
|
int diff = yMax - actualYIcons;
|
||||||
yBorder += (diff*(yBorder+iconXSize)) / actualYIcons;
|
yBorder += (diff*(yBorder+iconXSize)) / (actualYIcons+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (y==actualYIcons-1)
|
if (y==actualYIcons-1)
|
||||||
|
@ -100,12 +100,12 @@ QRect CSVWidget::SceneToolToggle::getIconBox (int index) const
|
||||||
// generating the last row of icons
|
// generating the last row of icons
|
||||||
int actualXIcons = total % xMax;
|
int actualXIcons = total % xMax;
|
||||||
|
|
||||||
if (actualYIcons)
|
if (actualXIcons)
|
||||||
{
|
{
|
||||||
// space out icons horizontally, if there aren't enough to fill the last row
|
// space out icons horizontally, if there aren't enough to fill the last row
|
||||||
int diff = xMax - actualYIcons;
|
int diff = xMax - actualXIcons;
|
||||||
|
|
||||||
xBorder += (diff*(xBorder+iconYSize)) / actualXIcons;
|
xBorder += (diff*(xBorder+iconXSize)) / (actualXIcons+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue