mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed scrolling with centered aligned text
This commit is contained in:
parent
3b2944496a
commit
3572c27dc9
@ -528,7 +528,6 @@ void cArea::CreatePixmap(cRect drawPort) {
|
||||
pix = sdOsd->CreatePixmap(layer, viewPort, drawPort);
|
||||
if (pix)
|
||||
pix->Clear();
|
||||
|
||||
int pixTransparency = attribs->Transparency();
|
||||
if (pixTransparency > 0) {
|
||||
SetTransparency(pixTransparency, true);
|
||||
|
@ -421,6 +421,7 @@ void cFuncDrawText::Render(cPixmap *p, int x0, int y0, int colWidth, int rowHeig
|
||||
} else if (horAlign == eAlign::center) {
|
||||
x = x0 + (contWidth - TextWidth(funcText)) / 2;
|
||||
}
|
||||
if (x < 0) x = 0;
|
||||
|
||||
int contHeight = rowHeight > 0 ? rowHeight : container.Height();
|
||||
int y = Y() + y0;
|
||||
@ -449,7 +450,7 @@ int cFuncDrawText::FuncX(void) {
|
||||
} else if (horAlign == eAlign::center) {
|
||||
x = (container.Width() - TextWidth(funcText)) / 2;
|
||||
}
|
||||
return x;
|
||||
return (x >= 0) ? x : 0 ;
|
||||
}
|
||||
|
||||
int cFuncDrawText::FuncY(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user