mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CProgressBar/CVolumeBar: fix position of active/passive bar
Assign real position values to progressbar if is bound (embedded) in a form. This is dependently from its own parent status. Status of cc_parent==NULL means, it's not bound and without parent form so we use x/y, otherwise we use real values stored by cc_xr/cc_yr. Values in cc_xr/cc_yr and cc_parent were assigned with addCCItem(). Signed-off-by: Michael Liebmann <tuxcode.bbg@gmail.com>
This commit is contained in:
@@ -231,10 +231,23 @@ void CVolumeBar::paintVolumeBarDigit()
|
||||
CTextBox* ctb = vb_digit->getCTextBoxObject();
|
||||
if (ctb)
|
||||
ctb->setFontUseDigitHeight();
|
||||
|
||||
// backup original x&y pos
|
||||
int _dx = vb_digit->getXPos();
|
||||
int _dy = vb_digit->getYPos();
|
||||
|
||||
// get real x&y pos
|
||||
int dx = vb_digit->getRealXPos();
|
||||
int dy = vb_digit->getRealYPos();
|
||||
|
||||
// set real x&y pos
|
||||
vb_digit->setDimensionsAll(dx, dy, digit_w, height);
|
||||
|
||||
// paint digit
|
||||
vb_digit->paint(CC_SAVE_SCREEN_NO);
|
||||
|
||||
// restore original x&y pos
|
||||
vb_digit->setDimensionsAll(_dx, _dy, digit_w, height);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user