mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
fix positioning in single line
This commit is contained in:
parent
262c15dbb2
commit
da815aba72
1 changed files with 10 additions and 5 deletions
|
@ -397,11 +397,11 @@ bool AxisLayout::canTryScalingDown(
|
||||||
if (prio > minMaxPrios.first) {
|
if (prio > minMaxPrios.first) {
|
||||||
while (true) {
|
while (true) {
|
||||||
prio -= 1;
|
prio -= 1;
|
||||||
auto scale = this->maxScaleForPrio(nodes, prio);
|
auto mscale = this->maxScaleForPrio(nodes, prio);
|
||||||
if (!scale) {
|
if (!mscale) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
crossScaleDownFactor = scale;
|
scale = mscale;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
attemptRescale = true;
|
attemptRescale = true;
|
||||||
|
@ -493,7 +493,7 @@ void AxisLayout::tryFitLayout(
|
||||||
return this->tryFitLayout(
|
return this->tryFitLayout(
|
||||||
on, nodes,
|
on, nodes,
|
||||||
minMaxPrios, doAutoScale,
|
minMaxPrios, doAutoScale,
|
||||||
crossScaleDownFactor, squish, prio
|
scale, squish, prio
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,12 @@ void AxisLayout::tryFitLayout(
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (ix) {
|
if (ix) {
|
||||||
rowAxisPos += this->nextGap(prev, opts) * row->scale * row->squish;
|
if (row->prio == minMaxPrios.first) {
|
||||||
|
rowAxisPos += this->nextGap(prev, opts) * row->scale * row->squish;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rowAxisPos += this->nextGap(prev, opts) * row->squish;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
axisPos = rowAxisPos + pos.axisLength * pos.axisAnchor;
|
axisPos = rowAxisPos + pos.axisLength * pos.axisAnchor;
|
||||||
rowAxisPos += pos.axisLength -
|
rowAxisPos += pos.axisLength -
|
||||||
|
|
Loading…
Reference in a new issue