mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Fixed layout centering
This commit is contained in:
parent
0b3e35db72
commit
82d2ac0871
@ -147,8 +147,9 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
|
||||
if (!testOnly) {
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
const FlowLayoutItem &li = rows.at(i).last();
|
||||
int width = li.item->sizeHint().width() + li.pos.x();
|
||||
int offset = (rect.width() - width) / 2;
|
||||
int width = li.item->sizeHint().width() + li.pos.x()
|
||||
- effectiveRect.x();
|
||||
int offset = (effectiveRect.width() - width) / 2;
|
||||
|
||||
int height = 0;
|
||||
for (int j = 0; j < rows.at(i).size(); j++)
|
||||
|
Loading…
Reference in New Issue
Block a user