mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +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>
Origin commit data
------------------
Branch: ni/coolstream
Commit: fb812f38e8
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-06-02 (Sun, 02 Jun 2013)
------------------
This commit was generated by Migit
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