always use non-bold font for slim faders
This commit is contained in:
parent
b129376d4f
commit
edc6e63d2c
1 changed files with 6 additions and 18 deletions
|
@ -606,12 +606,11 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )
|
||||||
|
|
||||||
QString strModText = cChanInfo.strName;
|
QString strModText = cChanInfo.strName;
|
||||||
|
|
||||||
// apply break position and font size depending on the selected design as
|
// apply break position and font size depending on the selected design
|
||||||
// well as the length of the name
|
if ( eDesign == GD_SLIMFADER )
|
||||||
if ( ( eDesign == GD_SLIMFADER ) && ( strModText.length() > 6 ) )
|
|
||||||
{
|
{
|
||||||
// in slim mode, if the text is longer than 6 character, use a small font
|
// in slim mode use a non-bold font (smaller width font)
|
||||||
plblLabel->setStyleSheet ( "QLabel { color: black; }" ); // not bold
|
plblLabel->setStyleSheet ( "QLabel { color: black; }" );
|
||||||
|
|
||||||
// break at every 4th character
|
// break at every 4th character
|
||||||
for ( int iInsPos = 4; iInsPos <= strModText.size() - 1; iInsPos += 4 + 1 )
|
for ( int iInsPos = 4; iInsPos <= strModText.size() - 1; iInsPos += 4 + 1 )
|
||||||
|
@ -621,22 +620,11 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// in normal mode use bold font
|
||||||
plblLabel->setStyleSheet ( "QLabel { color: black; font: bold; }" );
|
plblLabel->setStyleSheet ( "QLabel { color: black; font: bold; }" );
|
||||||
|
|
||||||
// break text at predefined position
|
// break text at predefined position
|
||||||
int iBreakPos;
|
const int iBreakPos = MAX_LEN_FADER_TAG / 2;
|
||||||
|
|
||||||
if ( eDesign == GD_SLIMFADER )
|
|
||||||
{
|
|
||||||
// for slim design if the text is shorter than 6 characters, break
|
|
||||||
// at half of the 6 characters
|
|
||||||
iBreakPos = 3;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// default break position (used for other skins than slim)
|
|
||||||
iBreakPos = MAX_LEN_FADER_TAG / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( strModText.length() > iBreakPos )
|
if ( strModText.length() > iBreakPos )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue