fixed alignment for mixer fader
This commit is contained in:
parent
f3ce0f8ea2
commit
d3644c447d
2 changed files with 25 additions and 12 deletions
|
@ -336,8 +336,8 @@ for ( i = 0; i < vecChanInfo.Size(); i++ )
|
|||
{
|
||||
QHostAddress addrTest ( vecChanInfo[i].veciIpAddr );
|
||||
|
||||
vecpChanFader[i]->Show();
|
||||
vecpChanFader[i]->SetText ( addrTest.toString().latin1() );
|
||||
vecpChanFader[i]->Show();
|
||||
|
||||
|
||||
|
||||
|
@ -401,9 +401,6 @@ CLlconClientDlg::CChannelFader::CChannelFader ( QWidget* pNW,
|
|||
pFader = new QSlider ( Qt::Vertical, pNW );
|
||||
pLabel = new QLabel ( "", pNW );
|
||||
|
||||
// add slider to grid as position 0 / 0
|
||||
pMainGrid->addWidget( pFader, 0, 0 );
|
||||
|
||||
// setup slider
|
||||
pFader->setPageStep ( 1 );
|
||||
pFader->setTickmarks ( QSlider::Both );
|
||||
|
@ -414,17 +411,33 @@ CLlconClientDlg::CChannelFader::CChannelFader ( QWidget* pNW,
|
|||
pFader->setValue ( 0 );
|
||||
pFader->setEnabled ( FALSE );
|
||||
|
||||
|
||||
// add label to grid
|
||||
pMainGrid->addWidget( pLabel, 1, 0 );
|
||||
|
||||
// set label text
|
||||
pLabel->setText ( sName );
|
||||
|
||||
// add slider to grid as position 0 / 0
|
||||
pMainGrid->addWidget( pFader, 0, 0, Qt::AlignHCenter );
|
||||
|
||||
// add label to grid as position 1 / 0
|
||||
pMainGrid->addWidget( pLabel, 1, 0, Qt::AlignHCenter );
|
||||
|
||||
pParentLayout->insertLayout ( 0, pMainGrid );
|
||||
}
|
||||
|
||||
void CLlconClientDlg::CChannelFader::SetText ( const std::string sText )
|
||||
{
|
||||
pLabel->setText ( sText.c_str() );
|
||||
const int iBreakPos = 6;
|
||||
|
||||
// break text at predefined position
|
||||
QString sModText = sText.c_str();
|
||||
|
||||
if ( sModText.length() > iBreakPos )
|
||||
{
|
||||
sModText.insert ( iBreakPos, QString ( "<br>" ) );
|
||||
}
|
||||
|
||||
// use bold text
|
||||
sModText.prepend ( "<b>" );
|
||||
sModText.append ( "</b>" );
|
||||
|
||||
pLabel->setText ( sModText );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue