File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -337,10 +337,10 @@ namespace gui
337
337
break ;
338
338
case gui::Alignment::Vertical::Center:
339
339
if (reverseOrder) {
340
- return calcPos + el->getMargins ().getSumInAxis (axis) - offset / 2 ;
340
+ return calcPos - ((offset - el->getMargins ().getSumInAxis (axis)) / 2 ) ;
341
341
}
342
342
else {
343
- return calcPos - el->getMargins ().getSumInAxis (axis) + offset / 2 ;
343
+ return calcPos + ((offset - el->getMargins ().getSumInAxis (axis)) / 2 ) ;
344
344
}
345
345
break ;
346
346
case gui::Alignment::Vertical::Bottom:
@@ -360,10 +360,10 @@ namespace gui
360
360
break ;
361
361
case gui::Alignment::Horizontal::Center:
362
362
if (reverseOrder) {
363
- return calcPos + el->getMargins ().getSumInAxis (axis) - offset / 2 ;
363
+ return calcPos - ((offset - el->getMargins ().getSumInAxis (axis)) / 2 ) ;
364
364
}
365
365
else {
366
- return calcPos - el->getMargins ().getSumInAxis (axis) + offset / 2 ;
366
+ return calcPos + ((offset - el->getMargins ().getSumInAxis (axis)) / 2 ) ;
367
367
}
368
368
break ;
369
369
case gui::Alignment::Horizontal::Right:
You can’t perform that action at this time.
0 commit comments