mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
fix(ui): fix incorrect order in SynthesizeSide
This commit is contained in:
parent
ad10aa03c1
commit
c1d9eb5f72
@ -11,12 +11,12 @@
|
|||||||
STORM_EXPLICIT_LIST(CLayoutFrame, resizeLink) LayoutFrame::s_resizePendingList;
|
STORM_EXPLICIT_LIST(CLayoutFrame, resizeLink) LayoutFrame::s_resizePendingList;
|
||||||
|
|
||||||
float SynthesizeSide(float center, float opposite, float size) {
|
float SynthesizeSide(float center, float opposite, float size) {
|
||||||
if (center != CFramePoint::UNDEFINED && opposite != CFramePoint::UNDEFINED) {
|
if (opposite != CFramePoint::UNDEFINED && size != 0.0f) {
|
||||||
return center + center - opposite;
|
|
||||||
} else if (opposite != CFramePoint::UNDEFINED && size != 0.0f) {
|
|
||||||
return opposite + size;
|
return opposite + size;
|
||||||
} else if (center != CFramePoint::UNDEFINED && size != 0.0f) {
|
} else if (center != CFramePoint::UNDEFINED && size != 0.0f) {
|
||||||
return center + (size * 0.5f);
|
return center + (size * 0.5f);
|
||||||
|
} else if (center != CFramePoint::UNDEFINED && opposite != CFramePoint::UNDEFINED) {
|
||||||
|
return center + center - opposite;
|
||||||
} else {
|
} else {
|
||||||
return CFramePoint::UNDEFINED;
|
return CFramePoint::UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user