mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 08:34:34 +02:00
* Fix elided texts fo now-playing row in PlaylistItemDelegate.
* Fixed blue now-playing frame around the entire row.
This commit is contained in:
@@ -349,7 +349,6 @@ Servent::createParallelConnection( Connection* orig_conn, Connection* new_conn,
|
||||
}
|
||||
|
||||
|
||||
/// for outbound connections. DRY out the socket handover code from readyread too?
|
||||
void
|
||||
Servent::socketConnected()
|
||||
{
|
||||
|
@@ -62,7 +62,7 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
|
||||
if ( item->isPlaying() )
|
||||
{
|
||||
painter->save();
|
||||
painter->setRenderHint( QPainter::Antialiasing );
|
||||
// painter->setRenderHint( QPainter::Antialiasing );
|
||||
|
||||
{
|
||||
QRect r = option.rect.adjusted( 3, 0, 0, 0 );
|
||||
@@ -73,13 +73,14 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
|
||||
r.adjust( 22, 0, 0, 3 );
|
||||
}
|
||||
|
||||
QTextOption to( Qt::AlignVCenter );
|
||||
|
||||
painter->setPen( option.palette.text().color() );
|
||||
painter->drawText( r.adjusted( 0, 1, 0, 0 ), index.data().toString(), to );
|
||||
|
||||
QTextOption to( Qt::AlignVCenter );
|
||||
QString text = painter->fontMetrics().elidedText( index.data().toString(), Qt::ElideRight, r.width() - 3 );
|
||||
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, to );
|
||||
}
|
||||
|
||||
if ( m_view->header()->visualIndex( index.column() ) == m_view->header()->visibleSectionCount() - 1 )
|
||||
// if ( m_view->header()->visualIndex( index.column() ) == m_view->header()->visibleSectionCount() - 1 )
|
||||
{
|
||||
QRect r = QRect( 3, option.rect.y() + 1, m_view->viewport()->width() - 6, option.rect.height() - 2 );
|
||||
painter->setPen( option.palette.highlight().color() );
|
||||
|
@@ -135,12 +135,16 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
m_servent = new Servent( this );
|
||||
connect( m_servent, SIGNAL( ready() ), SLOT( setupSIP() ) );
|
||||
|
||||
qDebug() << "Init Database.";
|
||||
setupDatabase();
|
||||
|
||||
qDebug() << "Init Echonest Factory.";
|
||||
GeneratorFactory::registerFactory( "echonest", new EchonestFactory );
|
||||
|
||||
#ifndef NO_LIBLASTFM
|
||||
qDebug() << "Init Scrobbler.";
|
||||
m_scrobbler = new Scrobbler( this );
|
||||
qDebug() << "Setting NAM.";
|
||||
TomahawkUtils::setNam( new lastfm::NetworkAccessManager( this ) );
|
||||
|
||||
connect( m_audioEngine, SIGNAL( started( const Tomahawk::result_ptr& ) ),
|
||||
@@ -155,6 +159,7 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
connect( m_audioEngine, SIGNAL( stopped() ),
|
||||
m_scrobbler, SLOT( trackStopped() ), Qt::QueuedConnection );
|
||||
#else
|
||||
qDebug() << "Setting NAM.";
|
||||
TomahawkUtils::setNam( new QNetworkAccessManager );
|
||||
#endif
|
||||
|
||||
@@ -173,12 +178,15 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
|
||||
QNetworkProxy::setApplicationProxy( *TomahawkUtils::proxy() );
|
||||
|
||||
qDebug() << "Init SIP system.";
|
||||
m_sipHandler = new SipHandler( this );
|
||||
qDebug() << "Init InfoSystem.";
|
||||
m_infoSystem = new Tomahawk::InfoSystem::InfoSystem( this );
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
if ( !m_headless )
|
||||
{
|
||||
qDebug() << "Init MainWindow.";
|
||||
m_mainwindow = new TomahawkWindow();
|
||||
m_mainwindow->setWindowTitle( "Tomahawk" );
|
||||
m_mainwindow->show();
|
||||
@@ -186,13 +194,19 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
}
|
||||
#endif
|
||||
|
||||
qDebug() << "Init Pipeline.";
|
||||
setupPipeline();
|
||||
qDebug() << "Init Local Collection.";
|
||||
initLocalCollection();
|
||||
qDebug() << "Init Servent.";
|
||||
startServent();
|
||||
//loadPlugins();
|
||||
|
||||
if( arguments().contains( "--http" ) || TomahawkSettings::instance()->value( "network/http", true ).toBool() )
|
||||
{
|
||||
qDebug() << "Init HTTP Server.";
|
||||
startHTTP();
|
||||
}
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
if ( !TomahawkSettings::instance()->hasScannerPath() )
|
||||
|
Reference in New Issue
Block a user