1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 05:37:29 +02:00

* Style clean up for TomahawkWindow.

This commit is contained in:
Christian Muehlhaeuser
2013-01-04 12:39:00 +01:00
parent ce562aeddf
commit 5e4b0b96be

View File

@@ -140,8 +140,7 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
if ( qApp->arguments().contains( "--debug" ) ) if ( qApp->arguments().contains( "--debug" ) )
{ {
connect( ActionCollection::instance()->getAction( "crashNow" ), SIGNAL( triggered() ), connect( ActionCollection::instance()->getAction( "crashNow" ), SIGNAL( triggered() ), SLOT( crashNow() ) );
this, SLOT( crashNow() ) );
} }
// set initial state // set initial state
@@ -233,7 +232,7 @@ TomahawkWindow::applyPlatformTweaks()
// nothing and in QtCurve does evil things), and avoid forwarding it // nothing and in QtCurve does evil things), and avoid forwarding it
// to QtCurve. // to QtCurve.
bool isQtCurve = false; bool isQtCurve = false;
if( QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) ) if ( QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) )
isQtCurve = true; isQtCurve = true;
qApp->setStyle( new ProxyStyle( isQtCurve ) ); qApp->setStyle( new ProxyStyle( isQtCurve ) );
@@ -506,7 +505,7 @@ HICON
TomahawkWindow::thumbIcon(TomahawkUtils::ImageType type) TomahawkWindow::thumbIcon(TomahawkUtils::ImageType type)
{ {
static QMap<TomahawkUtils::ImageType,HICON> thumbIcons; static QMap<TomahawkUtils::ImageType,HICON> thumbIcons;
if(!thumbIcons.contains( type ) ) if (!thumbIcons.contains( type ) )
{ {
QPixmap pix ( TomahawkUtils::defaultPixmap(type , TomahawkUtils::Original, QSize( 20, 20 ) ) ); QPixmap pix ( TomahawkUtils::defaultPixmap(type , TomahawkUtils::Original, QSize( 20, 20 ) ) );
thumbIcons[type] = pix.toWinHICON(); thumbIcons[type] = pix.toWinHICON();
@@ -568,6 +567,7 @@ TomahawkWindow::setupMenuBar()
#endif #endif
} }
void void
TomahawkWindow::changeEvent( QEvent* e ) TomahawkWindow::changeEvent( QEvent* e )
{ {
@@ -895,10 +895,10 @@ TomahawkWindow::addPeerManually()
void void
TomahawkWindow::showOfflineSources() TomahawkWindow::showOfflineSources()
{ {
m_sourcetree->showOfflineSources( ActionCollection::instance() m_sourcetree->showOfflineSources(
->getAction( "showOfflineSources" )->isChecked() ); ActionCollection::instance()->getAction( "showOfflineSources" )->isChecked() );
TomahawkSettings::instance()->setShowOfflineSources( ActionCollection::instance() TomahawkSettings::instance()->setShowOfflineSources(
->getAction( "showOfflineSources" )->isChecked() ); ActionCollection::instance()->getAction( "showOfflineSources" )->isChecked() );
} }
@@ -1326,7 +1326,7 @@ void
TomahawkWindow::toggleMenuBar() //SLOT TomahawkWindow::toggleMenuBar() //SLOT
{ {
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
if( menuBar()->isVisible() ) if ( menuBar()->isVisible() )
{ {
menuBar()->setVisible( false ); menuBar()->setVisible( false );
ActionCollection::instance()->getAction( "toggleMenuBar" )->setText( tr( "Show Menu Bar" ) ); ActionCollection::instance()->getAction( "toggleMenuBar" )->setText( tr( "Show Menu Bar" ) );