1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-10 16:14:40 +02:00

Highlight the summary a bit. Could use some prettifying.

This commit is contained in:
Leo Franchi
2011-02-18 23:04:23 -05:00
parent 94625692d7
commit 65fd1e5548
2 changed files with 7 additions and 2 deletions

View File

@@ -34,7 +34,6 @@ Tomahawk::EchonestControl::EchonestControl( const QString& selectedType, const Q
connect( &m_editingTimer, SIGNAL( timeout() ), this, SIGNAL( changed() ) );
updateWidgets();
updateData();
}
QWidget*
@@ -393,6 +392,7 @@ Tomahawk::EchonestControl::updateData()
int enumVal = input->itemData( input->currentIndex() ).toInt() + m_matchData.toInt();
m_data.first = Echonest::DynamicPlaylist::Sort;
m_data.second = enumVal;
qDebug() << "SAVING" << input->currentIndex() << "AS" << enumVal;
}
}
@@ -459,6 +459,7 @@ Tomahawk::EchonestControl::updateWidgetsFromData()
// HACK alert. if it's odd, subtract 1
int val = m_data.second.toInt() - ( m_data.second.toInt() % 2 );
input->setCurrentIndex( val );
qDebug() << "LOADING" << m_data.second.toInt() << "AS" <<val;
}
}
calculateSummary();
@@ -521,7 +522,7 @@ Tomahawk::EchonestControl::calculateSummary()
} else if( selectedType() == "Tempo" ) {
summary = QString( "about %1 BPM" ).arg( m_data.second.toString() );
} else if( selectedType() == "Duration" ) {
summary = QString( "about %1 minutes long" ).arg( m_data.second / 60 );
summary = QString( "about %1 minutes long" ).arg( m_data.second.toInt() / 60 );
} else if( selectedType() == "Loudness" ) {
summary = QString( "about %1 dB" ).arg( m_data.second.toString() );
} else if( selectedType() == "Latitude" || selectedType() == "Longitude" ) {

View File

@@ -84,6 +84,10 @@ CollapsibleControls::init()
m_summaryWidget->setContentsMargins( 3, 0, 0, 0 );
m_summary = new QLabel( m_summaryWidget );
QFont f = m_summary->font();
f.setPointSize( f.pointSize() + 1 );
f.setBold( true );
m_summary->setFont( f );
m_summaryLayout->addWidget( m_summary, 1 );
m_summaryExpand = DynamicControlWrapper::initButton( this );
m_summaryExpand->setIcon( QIcon( RESPATH "images/arrow-down-double.png" ) );