Fix <text> alignment. Because our <text> widget is an empty puObject's
label, we need to compensate for the gap in-between: PUSTR_RGAP (pu.h). Without that, all text appears shifted right.
This commit is contained in:
parent
58179758af
commit
affa6b8a38
1 changed files with 4 additions and 1 deletions
|
@ -153,7 +153,10 @@ void LayoutWidget::layout(int x, int y, int w, int h)
|
||||||
// the x/y/w/h box we have calculated.
|
// the x/y/w/h box we have calculated.
|
||||||
if (isType("text")) {
|
if (isType("text")) {
|
||||||
// puText labels are layed out to the right of the box, so
|
// puText labels are layed out to the right of the box, so
|
||||||
// zero the width.
|
// zero the width. Also subtract PUSTR_RGAP from the x
|
||||||
|
// coordinate to compensate for the added gap between the
|
||||||
|
// label and its empty puObject.
|
||||||
|
x -= 5;
|
||||||
w = 0;
|
w = 0;
|
||||||
} else if (isType("input") || isType("combo") || isType("select")) {
|
} else if (isType("input") || isType("combo") || isType("select")) {
|
||||||
// Fix the height to a constant
|
// Fix the height to a constant
|
||||||
|
|
Loading…
Add table
Reference in a new issue