@@ -56,7 +56,7 @@ void FxRoute::updateName()
|
||||
{
|
||||
if( m_amount)
|
||||
{
|
||||
m_amount->setDisplayName(
|
||||
m_amount->setDisplayName(
|
||||
tr( "Amount to send from channel %1 to channel %2" ).arg( m_from->m_channelIndex ).arg( m_to->m_channelIndex ) );
|
||||
}
|
||||
}
|
||||
@@ -258,7 +258,7 @@ void FxMixer::deleteChannel( int index )
|
||||
// actually delete the channel
|
||||
delete m_fxChannels[index];
|
||||
m_fxChannels.remove(index);
|
||||
|
||||
|
||||
for( int i = index; i < m_fxChannels.size(); ++i )
|
||||
{
|
||||
validateChannelName( i, i + 1 );
|
||||
@@ -308,7 +308,7 @@ void FxMixer::moveChannelLeft( int index )
|
||||
FxChannel * tmpChannel = m_fxChannels[a];
|
||||
m_fxChannels[a] = m_fxChannels[b];
|
||||
m_fxChannels[b] = tmpChannel;
|
||||
|
||||
|
||||
validateChannelName( a, b );
|
||||
validateChannelName( b, a );
|
||||
}
|
||||
@@ -353,13 +353,13 @@ void FxMixer::createRoute( FxChannel * from, FxChannel * to, float amount )
|
||||
}
|
||||
m_sendsMutex.lock();
|
||||
FxRoute * route = new FxRoute( from, to, amount );
|
||||
|
||||
|
||||
// add us to from's sends
|
||||
from->m_sends.append( route );
|
||||
|
||||
|
||||
// add us to to's receives
|
||||
to->m_receives.append( route );
|
||||
|
||||
|
||||
// add us to fxmixer's list
|
||||
engine::fxMixer()->m_fxRoutes.append( route );
|
||||
m_sendsMutex.unlock();
|
||||
@@ -414,13 +414,13 @@ bool FxMixer::isInfiniteLoop( fx_ch_t sendFrom, fx_ch_t sendTo )
|
||||
bool FxMixer::checkInfiniteLoop( FxChannel * from, FxChannel * to )
|
||||
{
|
||||
// can't send master to anything
|
||||
if( from == m_fxChannels[0] )
|
||||
{
|
||||
if( from == m_fxChannels[0] )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// can't send channel to itself
|
||||
if( from == to )
|
||||
if( from == to )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,9 @@ LmmsPalette::LmmsPalette( QWidget * parent, QStyle * stylearg ) :
|
||||
m_buttonText( 0,0,0 ),
|
||||
m_brightText( 74, 253, 133 ),
|
||||
m_highlight( 100, 100, 100 ),
|
||||
m_highlightedText( 255, 255, 255 )
|
||||
m_highlightedText( 255, 255, 255 ),
|
||||
m_toolTipText( 0, 0, 0 ),
|
||||
m_toolTipBase( 128, 128, 128 )
|
||||
{
|
||||
setStyle( stylearg );
|
||||
stylearg->polish( this );
|
||||
@@ -70,7 +72,8 @@ LmmsPalette::~LmmsPalette()
|
||||
ACCESSMET( brightText, setBrightText )
|
||||
ACCESSMET( highlight, setHighlight )
|
||||
ACCESSMET( highlightedText, setHighlightedText )
|
||||
|
||||
ACCESSMET( toolTipText, setToolTipText )
|
||||
ACCESSMET( toolTipBase, setToolTipBase )
|
||||
|
||||
|
||||
QPalette LmmsPalette::palette() const
|
||||
@@ -87,7 +90,8 @@ QPalette LmmsPalette::palette() const
|
||||
pal.setColor( QPalette::Shadow, shadow() );
|
||||
pal.setColor( QPalette::Highlight, highlight() );
|
||||
pal.setColor( QPalette::HighlightedText, highlightedText() );
|
||||
|
||||
pal.setBrush( QPalette::ToolTipText, QBrush( toolTipText() ) );
|
||||
pal.setBrush( QPalette::ToolTipBase, QBrush( toolTipBase() ) );
|
||||
return pal;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QStyleOption>
|
||||
|
||||
#include "text_float.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -41,6 +42,8 @@ textFloat::textFloat() :
|
||||
resize( 20, 20 );
|
||||
hide();
|
||||
|
||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||
setStyle( QApplication::style() );
|
||||
setFont( pointSize<8>( font() ) );
|
||||
}
|
||||
|
||||
@@ -125,35 +128,38 @@ textFloat * textFloat::displayMessage( const QString & _title,
|
||||
|
||||
void textFloat::paintEvent( QPaintEvent * _pe )
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init( this );
|
||||
QPainter p( this );
|
||||
p.fillRect( 0, 0, width(), height(), QColor( 0, 0, 0, 0 ) );
|
||||
|
||||
p.setPen( QColor( 0, 0, 0 ) );
|
||||
|
||||
p.setBrush( QColor( 224, 224, 224 ) );
|
||||
/* p.setPen( p.pen().brush().color() );
|
||||
p.setBrush( p.background() );*/
|
||||
|
||||
p.setFont( pointSize<8>( p.font() ) );
|
||||
|
||||
style()->drawPrimitive( QStyle::PE_Widget, &opt, &p, this );
|
||||
|
||||
p.drawRect( 0, 0, rect().right(), rect().bottom() );
|
||||
/* p.drawRect( 0, 0, rect().right(), rect().bottom() );*/
|
||||
|
||||
// p.setPen( Qt::black );
|
||||
// small message?
|
||||
if( m_title.isEmpty() )
|
||||
{
|
||||
p.drawText( 2, p.fontMetrics().height()-2, m_text );
|
||||
p.drawText( opt.rect, Qt::AlignCenter, m_text );
|
||||
}
|
||||
else
|
||||
{
|
||||
int text_x = 2;
|
||||
int text_x = opt.rect.left() + 2;
|
||||
int text_y = opt.rect.top() + 12;
|
||||
if( m_pixmap.isNull() == false )
|
||||
{
|
||||
p.drawPixmap( 5, 5, m_pixmap );
|
||||
p.drawPixmap( opt.rect.topLeft() + QPoint( 5, 5 ), m_pixmap );
|
||||
text_x += m_pixmap.width() + 8;
|
||||
}
|
||||
p.drawText( text_x, 28, m_text );
|
||||
p.drawText( text_x, text_y + 16, m_text );
|
||||
QFont f = p.font();
|
||||
f.setBold( true );
|
||||
p.setFont( f );
|
||||
p.drawText( text_x, 12, m_title );
|
||||
p.drawText( text_x, text_y, m_title );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,4 +200,4 @@ void textFloat::updateSize()
|
||||
|
||||
|
||||
|
||||
|
||||
#include "moc_text_float.cxx"
|
||||
|
||||
Reference in New Issue
Block a user