CtrlLib: Fixed Switch layout issue

git-svn-id: svn://ultimatepp.org/upp/trunk@15245 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-10-14 09:34:52 +00:00
parent f4d120d091
commit 97491fd0a0
2 changed files with 2 additions and 2 deletions

View file

@ -691,7 +691,7 @@ ctrl Switch {
DrawOption(w, x, (sz.cy - osz) / 2, 2);
w.DrawSmartText(x + osz + 4, (sz.cy - tcy) / 2, cs[i], .SetFont);
}
x += osz + 4 + textsize.cx + max(osz, tcy) / 2;
x += osz + 4 + textsize.cx + tcy / 2;
}
else {
if(pass) {

View file

@ -222,7 +222,7 @@ void Switch::Paint(Draw& w) {
}
v.rect = hr;
if(horz)
x += hr.Width() + tcy;
x += hr.Width() + tcy / 2;
else
y += linecy;
}