mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-13 04:21:51 +02:00
* Replaced a ton more PNGs with SVGs.
This commit is contained in:
parent
e9388209d1
commit
12b0efdf8f
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -18,38 +18,38 @@ QRadioButton::indicator {
|
||||
}
|
||||
|
||||
QRadioButton::indicator::unchecked {
|
||||
background-image: url(:/data/images/view-toggle-inactive-centre.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-inactive.png);
|
||||
background-image: url(:/data/images/view-toggle-inactive-centre.svg);
|
||||
image: url(:/data/images/view-toggle-icon-list-inactive.svg);
|
||||
}
|
||||
QRadioButton::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-centre.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.svg);
|
||||
}
|
||||
QRadioButton::indicator::pressed {
|
||||
background-image: url(:/data/images/view-toggle-pressed-centre.png);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.png);
|
||||
background-image: url(:/data/images/view-toggle-pressed-centre.svg);
|
||||
image: url(:/data/images/view-toggle-icon-list-active.svg);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::unchecked {
|
||||
background-image: url(:/data/images/view-toggle-inactive-left.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-inactive.png);
|
||||
background-image: url(:/data/images/view-toggle-inactive-left.svg);
|
||||
image: url(:/data/images/view-toggle-icon-artist-inactive.svg);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-left.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.svg);
|
||||
}
|
||||
QRadioButton#radioNormal::indicator::pressed {
|
||||
background-image: url(:/data/images/view-toggle-pressed-left.png);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.png);
|
||||
background-image: url(:/data/images/view-toggle-pressed-left.svg);
|
||||
image: url(:/data/images/view-toggle-icon-artist-active.svg);
|
||||
}
|
||||
QRadioButton#radioCloud::indicator::unchecked {
|
||||
background-image: url(:/data/images/view-toggle-inactive-right.png);
|
||||
image: url(:/data/images/view-toggle-icon-grid-inactive.png);
|
||||
background-image: url(:/data/images/view-toggle-inactive-right.svg);
|
||||
image: url(:/data/images/view-toggle-icon-grid-inactive.svg);
|
||||
}
|
||||
QRadioButton#radioCloud::indicator::checked {
|
||||
background-image: url(:/data/images/view-toggle-active-right.png);
|
||||
image: url(:/data/images/view-toggle-icon-grid-active.png);
|
||||
image: url(:/data/images/view-toggle-icon-grid-active.svg);
|
||||
}
|
||||
QRadioButton#radioCloud::indicator::pressed {
|
||||
background-image: url(:/data/images/view-toggle-pressed-right.png);
|
||||
image: url(:/data/images/view-toggle-icon-grid-active.png);
|
||||
background-image: url(:/data/images/view-toggle-pressed-right.svg);
|
||||
image: url(:/data/images/view-toggle-icon-grid-active.svg);
|
||||
}
|
||||
|
105
resources.qrc
105
resources.qrc
@ -18,16 +18,13 @@
|
||||
<file>data/images/pause-rest.svg</file>
|
||||
<file>data/images/play-pressed.svg</file>
|
||||
<file>data/images/play-rest.svg</file>
|
||||
<file>data/images/sipplugin-add.png</file>
|
||||
<file>data/images/sipplugin-remove.png</file>
|
||||
<file>data/images/playlist-icon.png</file>
|
||||
<file>data/images/playlist-icon.svg</file>
|
||||
<file>data/images/repeat-1-on-pressed.svg</file>
|
||||
<file>data/images/repeat-1-on-rest.svg</file>
|
||||
<file>data/images/repeat-all-on-pressed.svg</file>
|
||||
<file>data/images/repeat-all-on-rest.svg</file>
|
||||
<file>data/images/repeat-off-pressed.svg</file>
|
||||
<file>data/images/repeat-off-rest.svg</file>
|
||||
<file>data/images/search-box-dismiss-x.png</file>
|
||||
<file>data/images/seek-and-volume-knob-pressed.png</file>
|
||||
<file>data/images/seek-and-volume-knob-rest.png</file>
|
||||
<file>data/images/seek-slider-bkg.png</file>
|
||||
@ -42,33 +39,32 @@
|
||||
<file>data/images/view-toggle-active-centre.png</file>
|
||||
<file>data/images/view-toggle-active-left.png</file>
|
||||
<file>data/images/view-toggle-active-right.png</file>
|
||||
<file>data/images/view-toggle-icon-artist-active.png</file>
|
||||
<file>data/images/view-toggle-icon-artist-inactive.png</file>
|
||||
<file>data/images/view-toggle-icon-artist-active.svg</file>
|
||||
<file>data/images/view-toggle-icon-artist-inactive.svg</file>
|
||||
<file>data/images/view-toggle-icon-cloud-active.png</file>
|
||||
<file>data/images/view-toggle-icon-cloud-inactive.png</file>
|
||||
<file>data/images/view-toggle-icon-grid-active.png</file>
|
||||
<file>data/images/view-toggle-icon-grid-inactive.png</file>
|
||||
<file>data/images/view-toggle-icon-list-active.png</file>
|
||||
<file>data/images/view-toggle-icon-list-inactive.png</file>
|
||||
<file>data/images/view-toggle-inactive-centre.png</file>
|
||||
<file>data/images/view-toggle-inactive-left.png</file>
|
||||
<file>data/images/view-toggle-inactive-right.png</file>
|
||||
<file>data/images/view-toggle-pressed-centre.png</file>
|
||||
<file>data/images/view-toggle-pressed-left.png</file>
|
||||
<file>data/images/view-toggle-pressed-right.png</file>
|
||||
<file>data/images/list-add.png</file>
|
||||
<file>data/images/list-remove.png</file>
|
||||
<file>data/images/arrow-up-double.png</file>
|
||||
<file>data/images/arrow-down-double.png</file>
|
||||
<file>data/images/arrow-right-double.png</file>
|
||||
<file>data/images/view-refresh.png</file>
|
||||
<file>data/images/view-toggle-icon-grid-active.svg</file>
|
||||
<file>data/images/view-toggle-icon-grid-inactive.svg</file>
|
||||
<file>data/images/view-toggle-icon-list-active.svg</file>
|
||||
<file>data/images/view-toggle-icon-list-inactive.svg</file>
|
||||
<file>data/images/view-toggle-inactive-centre.svg</file>
|
||||
<file>data/images/view-toggle-inactive-left.svg</file>
|
||||
<file>data/images/view-toggle-inactive-right.svg</file>
|
||||
<file>data/images/view-toggle-pressed-centre.svg</file>
|
||||
<file>data/images/view-toggle-pressed-left.svg</file>
|
||||
<file>data/images/view-toggle-pressed-right.svg</file>
|
||||
<file>data/images/list-add.svg</file>
|
||||
<file>data/images/list-remove.svg</file>
|
||||
<file>data/images/arrow-up-double.svg</file>
|
||||
<file>data/images/arrow-down-double.svg</file>
|
||||
<file>data/images/arrow-right-double.svg</file>
|
||||
<file>data/images/view-refresh.svg</file>
|
||||
<file>data/images/volume-icon-muted.svg</file>
|
||||
<file>data/images/volume-icon-full.svg</file>
|
||||
<file>data/images/volume-slider-bkg.png</file>
|
||||
<file>data/images/volume-slider-level.png</file>
|
||||
<file>data/images/echonest_logo.png</file>
|
||||
<file>data/images/loading-animation.gif</file>
|
||||
<file>data/images/info.png</file>
|
||||
<file>data/images/info.svg</file>
|
||||
<file>data/images/back.svg</file>
|
||||
<file>data/images/forward.svg</file>
|
||||
<file>data/images/music-icon.png</file>
|
||||
@ -76,31 +72,27 @@
|
||||
<file>data/images/private-listening.png</file>
|
||||
<file>data/images/add.png</file>
|
||||
<file>data/images/recently-played.png</file>
|
||||
<file>data/images/supercollection.png</file>
|
||||
<file>data/images/supercollection.svg</file>
|
||||
<file>data/images/sipplugin-online.png</file>
|
||||
<file>data/images/sipplugin-offline.png</file>
|
||||
<file>data/images/advanced-settings.png</file>
|
||||
<file>data/images/account-settings.png</file>
|
||||
<file>data/images/music-settings.png</file>
|
||||
<file>data/images/resolvers-settings.png</file>
|
||||
<file>data/images/lastfm-settings.png</file>
|
||||
<file>data/images/advanced-settings.svg</file>
|
||||
<file>data/images/account-settings.svg</file>
|
||||
<file>data/images/music-settings.svg</file>
|
||||
<file>data/images/automatic-playlist.png</file>
|
||||
<file>data/images/station.png</file>
|
||||
<file>data/images/new-additions.png</file>
|
||||
<file>data/images/charts.png</file>
|
||||
<file>data/images/new-releases.png</file>
|
||||
<file>data/images/loved_playlist.png</file>
|
||||
<file>data/images/dashboard.png</file>
|
||||
<file>data/images/station.svg</file>
|
||||
<file>data/images/new-additions.svg</file>
|
||||
<file>data/images/charts.svg</file>
|
||||
<file>data/images/new-releases.svg</file>
|
||||
<file>data/images/loved_playlist.svg</file>
|
||||
<file>data/images/dashboard.svg</file>
|
||||
<file>data/images/artist-icon.png</file>
|
||||
<file>data/images/album-icon.png</file>
|
||||
<file>data/images/album-icon.svg</file>
|
||||
<file>data/images/track-icon.svg</file>
|
||||
<file>data/images/search-icon.png</file>
|
||||
<file>data/images/star-hover.png</file>
|
||||
<file>data/images/starred.png</file>
|
||||
<file>data/images/star-unstarred.png</file>
|
||||
<file>data/images/track-icon-22x22.png</file>
|
||||
<file>data/images/track-icon-32x32.png</file>
|
||||
<file>data/images/track-icon-16x16.png</file>
|
||||
<file>data/images/apply-check.png</file>
|
||||
<file>data/images/apply-check.svg</file>
|
||||
<file>data/stylesheets/topbar-radiobuttons.css</file>
|
||||
<file>data/icons/tomahawk-icon-16x16.png</file>
|
||||
<file>data/icons/tomahawk-icon-32x32.png</file>
|
||||
@ -119,7 +111,6 @@
|
||||
<file>data/sql/dbmigrate-27_to_28.sql</file>
|
||||
<file>data/sql/dbmigrate-28_to_29.sql</file>
|
||||
<file>data/js/tomahawk.js</file>
|
||||
<file>data/images/avatar_frame.png</file>
|
||||
<file>data/images/drop-all-songs.png</file>
|
||||
<file>data/images/drop-local-songs.png</file>
|
||||
<file>data/images/drop-top-songs.png</file>
|
||||
@ -127,42 +118,38 @@
|
||||
<file>data/images/drop-album.png</file>
|
||||
<file>data/images/spotify-logo.png</file>
|
||||
<file>data/images/itunes.png</file>
|
||||
<file>data/images/uploading.png</file>
|
||||
<file>data/images/downloading.png</file>
|
||||
<file>data/images/headphones.png</file>
|
||||
<file>data/images/uploading.svg</file>
|
||||
<file>data/images/downloading.svg</file>
|
||||
<file>data/images/headphones-off.png</file>
|
||||
<file>data/images/headphones-sidebar.png</file>
|
||||
<file>data/images/closed-padlock.png</file>
|
||||
<file>data/images/open-padlock.png</file>
|
||||
<file>data/images/headphones-bigger.png</file>
|
||||
<file>data/images/open-padlock.svg</file>
|
||||
<file>data/images/headphones.svg</file>
|
||||
<file>data/images/no-album-no-case.svg</file>
|
||||
<file>data/images/rdio.png</file>
|
||||
<file>data/images/grooveshark.png</file>
|
||||
<file>data/images/lastfm-icon.png</file>
|
||||
<file>data/images/spotifycore-logo.png</file>
|
||||
<file>data/images/playlist-header-tiled.png</file>
|
||||
<file>data/images/share.svg</file>
|
||||
<file>data/images/process-stop.png</file>
|
||||
<file>data/images/process-stop.svg</file>
|
||||
<file>data/icons/tomahawk-icon-128x128-grayscale.png</file>
|
||||
<file>data/images/collection.png</file>
|
||||
<file>data/images/collection.svg</file>
|
||||
<file>data/misc/tomahawk_pubkey.pem</file>
|
||||
<file>data/images/track-icon-sidebar.png</file>
|
||||
<file>data/images/jump-link.png</file>
|
||||
<file>data/images/jump-link.svg</file>
|
||||
<file>data/images/scrollbar-vertical-handle.png</file>
|
||||
<file>data/images/scrollbar-horizontal-handle.png</file>
|
||||
<file>data/images/subscribe-on.png</file>
|
||||
<file>data/images/subscribe-off.png</file>
|
||||
<file>data/images/add-contact.png</file>
|
||||
<file>data/images/subscribe-on.svg</file>
|
||||
<file>data/images/subscribe-off.svg</file>
|
||||
<file>data/images/add-contact.svg</file>
|
||||
<file>data/images/account-none.png</file>
|
||||
<file>data/images/green-dot.png</file>
|
||||
<file>data/images/green-dot.svg</file>
|
||||
<file>data/images/exfm.png</file>
|
||||
<file>data/images/soundcloud.png</file>
|
||||
<file>data/images/resolver-default.svg</file>
|
||||
<file>data/images/spotify-sourceicon.png</file>
|
||||
<file>data/images/account-offline.png</file>
|
||||
<file>data/images/account-online.png</file>
|
||||
<file>data/images/cancel.png</file>
|
||||
<file>data/images/delete.png</file>
|
||||
<file>data/images/cancel.svg</file>
|
||||
<file>data/images/delete.svg</file>
|
||||
<file>data/images/ok.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -223,15 +223,18 @@ SettingsDialog::SettingsDialog(QObject *parent )
|
||||
// ui->checkBoxEnableAdium->hide();
|
||||
// #endif
|
||||
|
||||
m_dialog->addTab( m_accountsWidget, QPixmap( RESPATH "images/account-settings.png" ), tr( "Services" ), tr( "Configure the accounts and services used by Tomahawk "
|
||||
"to search and retrieve music, find your friends and "
|
||||
"update your status." ) );
|
||||
m_dialog->addTab( m_accountsWidget, TomahawkUtils::defaultPixmap( TomahawkUtils::AccountSettings ),
|
||||
tr( "Services" ), tr( "Configure the accounts and services used by Tomahawk "
|
||||
"to search and retrieve music, find your friends and "
|
||||
"update your status." ) );
|
||||
|
||||
m_dialog->addTab( m_collectionWidget, QPixmap( RESPATH "images/music-settings.png" ), tr( "Collection" ), tr( "Manage how Tomahawk finds music on your computer." ));
|
||||
m_dialog->addTab( m_collectionWidget, TomahawkUtils::defaultPixmap( TomahawkUtils::MusicSettings ),
|
||||
tr( "Collection" ), tr( "Manage how Tomahawk finds music on your computer." ) );
|
||||
|
||||
m_dialog->addTab( m_advancedWidget, QPixmap( RESPATH "images/advanced-settings.png" ), tr( "Advanced" ), tr( "Configure Tomahawk's advanced settings, including "
|
||||
"network connectivity settings, browser interaction "
|
||||
"and more." ) );
|
||||
m_dialog->addTab( m_advancedWidget, TomahawkUtils::defaultPixmap( TomahawkUtils::AdvancedSettings ),
|
||||
tr( "Advanced" ), tr( "Configure Tomahawk's advanced settings, including "
|
||||
"network connectivity settings, browser interaction "
|
||||
"and more." ) );
|
||||
|
||||
m_dialog->setCurrentIndex( 0 );
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "GlobalActionManager.h"
|
||||
#include "Source.h"
|
||||
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
@ -66,8 +67,8 @@ SocialWidget::SocialWidget( QWidget* parent )
|
||||
ui->charsLeftLabel->setForegroundRole( QPalette::Text );
|
||||
ui->charsLeftLabel->setStyleSheet( "text: black" );
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Tweet" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setIcon( QIcon( RESPATH "images/ok.png" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Cancel )->setIcon( QIcon( RESPATH "images/cancel.png" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/ok.png" ) );
|
||||
ui->buttonBox->button( QDialogButtonBox::Cancel )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/cancel.svg" ) );
|
||||
|
||||
ui->textEdit->setStyleSheet( "border: 1px solid " + TomahawkUtils::Colors::BORDER_LINE.name() );
|
||||
|
||||
|
@ -66,14 +66,12 @@ AccountDelegate::AccountDelegate( QObject* parent )
|
||||
m_onHoverStar.load( RESPATH "images/star-hover.png" );
|
||||
m_onlineIcon.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_offlineIcon.load( RESPATH "images/sipplugin-offline.png" );
|
||||
m_removeIcon.load( RESPATH "images/list-remove.png" );
|
||||
|
||||
m_ratingStarPositive = m_ratingStarPositive.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_ratingStarNegative = m_ratingStarNegative.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_onlineIcon = m_onlineIcon.scaled( STATUS_ICON_SIZE, STATUS_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_offlineIcon = m_offlineIcon.scaled( STATUS_ICON_SIZE, STATUS_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_onHoverStar = m_onHoverStar.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_removeIcon = m_removeIcon.scaled( REMOVE_ICON_SIZE, REMOVE_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
m_defaultCover = m_defaultCover.scaled( ICONSIZE, ICONSIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
@ -267,7 +265,6 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
|
||||
rightEdge = drawStatus( painter, QPointF( rightEdge, center - painter->fontMetrics().height()/2 ), accts.first(), true );
|
||||
}
|
||||
|
||||
}
|
||||
else if ( canDelete )
|
||||
{
|
||||
|
@ -46,7 +46,6 @@ public slots:
|
||||
void doneInstalling ( const QPersistentModelIndex& idx );
|
||||
void errorInstalling ( const QPersistentModelIndex& idx );
|
||||
|
||||
|
||||
void doUpdateIndex( const QPersistentModelIndex& idx );
|
||||
|
||||
protected:
|
||||
@ -71,7 +70,7 @@ private:
|
||||
|
||||
QRect checkRectForIndex( const QStyleOptionViewItem &option, const QModelIndex &idx ) const;
|
||||
|
||||
QPixmap m_offlineIcon, m_onlineIcon, m_defaultCover, m_onHoverStar, m_ratingStarPositive, m_ratingStarNegative, m_removeIcon;
|
||||
QPixmap m_offlineIcon, m_onlineIcon, m_defaultCover, m_onHoverStar, m_ratingStarPositive, m_ratingStarNegative;
|
||||
int m_hoveringOver;
|
||||
QPersistentModelIndex m_hoveringItem, m_configPressed;
|
||||
mutable QHash< QPersistentModelIndex, QRect > m_cachedButtonRects;
|
||||
|
@ -37,15 +37,11 @@ using namespace Tomahawk::Accounts;
|
||||
AccountFactoryWrapperDelegate::AccountFactoryWrapperDelegate( QObject* parent )
|
||||
: QStyledItemDelegate( parent )
|
||||
{
|
||||
m_removePixmap.load( RESPATH "images/list-remove.png" );
|
||||
m_onlineIcon.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_offlineIcon.load( RESPATH "images/sipplugin-offline.png" );
|
||||
|
||||
m_removePixmap = m_removePixmap.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_onlineIcon = m_onlineIcon.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_offlineIcon = m_offlineIcon.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
m_configIcon = ImageRegistry::instance()->pixmap( RESPATH "images/configure.svg", QSize( CONFIG_WRENCH_SIZE - 8, CONFIG_WRENCH_SIZE - 8 ) );
|
||||
}
|
||||
|
||||
void
|
||||
@ -77,8 +73,8 @@ AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewIt
|
||||
painter->drawText( opt.rect.adjusted( checkRect.right() + PADDING, PADDING, -PADDING, -PADDING ), Qt::AlignLeft | Qt::AlignVCenter, acc->accountFriendlyName() );
|
||||
|
||||
// remove, config, status on right
|
||||
const QRect pmRect( opt.rect.right() - PADDING - m_removePixmap.width(), topIcon, ICON_SIZE, ICON_SIZE );
|
||||
painter->drawPixmap( pmRect, m_removePixmap );
|
||||
const QRect pmRect( opt.rect.right() - PADDING - ICON_SIZE, topIcon, ICON_SIZE, ICON_SIZE );
|
||||
painter->drawPixmap( pmRect, TomahawkUtils::defaultPixmap( TomahawkUtils::ListRemove, TomahawkUtils::Original, pmRect.size() ) );
|
||||
m_cachedButtonRects[ index ] = pmRect;
|
||||
|
||||
const QRect confRect( pmRect.left() - PADDING - CONFIG_WRENCH_SIZE, center - CONFIG_WRENCH_SIZE/2, CONFIG_WRENCH_SIZE, CONFIG_WRENCH_SIZE );
|
||||
@ -87,7 +83,7 @@ AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewIt
|
||||
topt.rect = confRect;
|
||||
topt.pos = confRect.topLeft();
|
||||
topt.font = opt.font;
|
||||
topt.icon = m_configIcon;
|
||||
topt.icon = ImageRegistry::instance()->pixmap( RESPATH "images/configure.svg", QSize( CONFIG_WRENCH_SIZE - 8, CONFIG_WRENCH_SIZE - 8 ) );
|
||||
topt.iconSize = QSize( CONFIG_WRENCH_SIZE - 8, CONFIG_WRENCH_SIZE - 8 );
|
||||
topt.subControls = QStyle::SC_ToolButton;
|
||||
topt.activeSubControls = QStyle::SC_None;
|
||||
|
@ -50,7 +50,6 @@ signals:
|
||||
|
||||
private:
|
||||
QPixmap m_removePixmap, m_offlineIcon, m_onlineIcon;
|
||||
QIcon m_configIcon;
|
||||
QModelIndex m_configPressed;
|
||||
|
||||
mutable QHash< QPersistentModelIndex, QRect > m_cachedCheckRects;
|
||||
|
@ -18,11 +18,10 @@
|
||||
|
||||
#include "ErrorStatusMessage.h"
|
||||
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
QPixmap* ErrorStatusMessage::s_pixmap = 0;
|
||||
|
||||
ErrorStatusMessage::ErrorStatusMessage( const QString& message, int timeoutSecs )
|
||||
: JobStatusItem()
|
||||
@ -33,10 +32,6 @@ ErrorStatusMessage::ErrorStatusMessage( const QString& message, int timeoutSecs
|
||||
m_timer->setSingleShot( true );
|
||||
|
||||
connect( m_timer, SIGNAL( timeout() ), this, SIGNAL( finished() ) );
|
||||
|
||||
if ( !s_pixmap )
|
||||
s_pixmap = new QPixmap( RESPATH "images/process-stop.png" );
|
||||
|
||||
m_timer->start();
|
||||
}
|
||||
|
||||
@ -44,8 +39,7 @@ ErrorStatusMessage::ErrorStatusMessage( const QString& message, int timeoutSecs
|
||||
QPixmap
|
||||
ErrorStatusMessage::icon() const
|
||||
{
|
||||
Q_ASSERT( s_pixmap );
|
||||
return *s_pixmap;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::ProcessStop, TomahawkUtils::Original, QSize( 64, 64 ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,12 +18,10 @@
|
||||
|
||||
#include "IndexingJobItem.h"
|
||||
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
static QPixmap* s_indexIcon = 0;
|
||||
|
||||
|
||||
QString
|
||||
IndexingJobItem::mainText() const
|
||||
@ -34,10 +32,7 @@ IndexingJobItem::mainText() const
|
||||
QPixmap
|
||||
IndexingJobItem::icon() const
|
||||
{
|
||||
if ( s_indexIcon == 0 )
|
||||
s_indexIcon = new QPixmap( RESPATH "images/view-refresh.png" );
|
||||
|
||||
return *s_indexIcon;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::ViewRefresh, TomahawkUtils::Original, QSize( 128, 128 ) );
|
||||
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
#include "SourceList.h"
|
||||
#include "JobStatusView.h"
|
||||
#include "JobStatusModel.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
|
||||
LatchedStatusItem::LatchedStatusItem( const Tomahawk::source_ptr& from, const Tomahawk::source_ptr& to, LatchedStatusManager* parent )
|
||||
: JobStatusItem()
|
||||
@ -65,8 +66,6 @@ LatchedStatusManager::LatchedStatusManager( QObject* parent )
|
||||
{
|
||||
connect( SourceList::instance(), SIGNAL( sourceLatchedOn( Tomahawk::source_ptr, Tomahawk::source_ptr ) ), this, SLOT( latchedOn( Tomahawk::source_ptr, Tomahawk::source_ptr ) ) );
|
||||
connect( SourceList::instance(), SIGNAL( sourceLatchedOff( Tomahawk::source_ptr, Tomahawk::source_ptr ) ), this, SLOT( latchedOff( Tomahawk::source_ptr, Tomahawk::source_ptr ) ) );
|
||||
|
||||
m_pixmap.load( RESPATH "images/headphones-bigger.png" );
|
||||
}
|
||||
|
||||
void
|
||||
@ -113,3 +112,10 @@ LatchedStatusManager::latchedOff( const Tomahawk::source_ptr& from, const Tomaha
|
||||
item.data()->stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
LatchedStatusManager::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::HeadphonesOn, TomahawkUtils::Original, QSize( 128, 128 ) );
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
explicit LatchedStatusManager( QObject* parent = 0 );
|
||||
virtual ~LatchedStatusManager() {}
|
||||
|
||||
QPixmap pixmap() const { return m_pixmap; }
|
||||
QPixmap pixmap() const;
|
||||
|
||||
private slots:
|
||||
void latchedOn( const Tomahawk::source_ptr&, const Tomahawk::source_ptr& );
|
||||
@ -61,7 +61,6 @@ private slots:
|
||||
void sourceOffline();
|
||||
|
||||
private:
|
||||
QPixmap m_pixmap;
|
||||
QHash< QString, QWeakPointer< LatchedStatusItem > > m_jobs;
|
||||
};
|
||||
|
||||
|
@ -20,12 +20,13 @@
|
||||
|
||||
#include "JobStatusView.h"
|
||||
#include "JobStatusModel.h"
|
||||
#include "network/StreamConnection.h"
|
||||
#include "network/Servent.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "Result.h"
|
||||
#include "Source.h"
|
||||
#include "Artist.h"
|
||||
#include "network/StreamConnection.h"
|
||||
#include "network/Servent.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
|
||||
TransferStatusItem::TransferStatusItem( TransferStatusManager* p, StreamConnection* sc )
|
||||
: m_parent( p )
|
||||
@ -85,8 +86,8 @@ TransferStatusItem::icon() const
|
||||
|
||||
if ( m_stream.data()->type() == StreamConnection::SENDING )
|
||||
return m_parent->rxPixmap();
|
||||
else
|
||||
return m_parent->txPixmap();
|
||||
else
|
||||
return m_parent->txPixmap();
|
||||
}
|
||||
|
||||
|
||||
@ -100,9 +101,6 @@ TransferStatusItem::onTransferUpdate()
|
||||
TransferStatusManager::TransferStatusManager( QObject* parent )
|
||||
: QObject( parent )
|
||||
{
|
||||
m_rxPixmap.load( RESPATH "images/uploading.png" );
|
||||
m_txPixmap.load( RESPATH "images/downloading.png" );
|
||||
|
||||
connect( Servent::instance(), SIGNAL( streamStarted( StreamConnection* ) ), SLOT( streamRegistered( StreamConnection* ) ) );
|
||||
}
|
||||
|
||||
@ -111,3 +109,17 @@ TransferStatusManager::streamRegistered( StreamConnection* sc )
|
||||
{
|
||||
JobStatusView::instance()->model()->addJob( new TransferStatusItem( this, sc ) );
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
TransferStatusManager::rxPixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Downloading, TomahawkUtils::Original, QSize( 128, 128 ) );
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
TransferStatusManager::txPixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Uploading, TomahawkUtils::Original, QSize( 128, 128 ) );
|
||||
}
|
||||
|
@ -32,14 +32,11 @@ public:
|
||||
explicit TransferStatusManager( QObject* parent = 0 );
|
||||
virtual ~TransferStatusManager() {}
|
||||
|
||||
QPixmap rxPixmap() const { return m_rxPixmap; }
|
||||
QPixmap txPixmap() const { return m_txPixmap; }
|
||||
QPixmap rxPixmap() const;
|
||||
QPixmap txPixmap() const;
|
||||
|
||||
private slots:
|
||||
void streamRegistered( StreamConnection* sc );
|
||||
|
||||
private:
|
||||
QPixmap m_rxPixmap, m_txPixmap;
|
||||
};
|
||||
|
||||
class TransferStatusItem : public JobStatusItem
|
||||
|
@ -22,9 +22,10 @@
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "ViewManager.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "PlaylistUpdaterInterface.h"
|
||||
#include "Source.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@ -160,3 +161,10 @@ PlaylistView::onMenuTriggered( int action )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
PlaylistView::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist );
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
|
||||
virtual QList<Tomahawk::PlaylistUpdaterInterface*> updaters() const;
|
||||
|
||||
virtual QPixmap pixmap() const { return QPixmap( RESPATH "images/playlist-icon.png" ); }
|
||||
virtual QPixmap pixmap() const;
|
||||
virtual bool isTemporaryPage() const;
|
||||
|
||||
signals:
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "Source.h"
|
||||
#include "playlist/dynamic/widgets/DynamicWidget.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
@ -108,13 +109,13 @@ EchonestSteerer::EchonestSteerer( QWidget* parent )
|
||||
connect( m_description, SIGNAL( textChanged( QString ) ), this, SLOT( changed() ) );
|
||||
|
||||
m_apply = initButton( this );
|
||||
m_apply->setIcon( QIcon( RESPATH "images/apply-check.png" ) );
|
||||
m_apply->setIcon( ImageRegistry::instance()->icon( RESPATH "images/apply-check.svg" ) );
|
||||
m_apply->setToolTip( tr( "Apply steering command" ) );
|
||||
m_layout->addWidget( m_apply );
|
||||
connect( m_apply, SIGNAL( clicked( bool ) ), this, SLOT( applySteering() ) );
|
||||
|
||||
m_reset = initButton( this );
|
||||
m_reset->setIcon( QIcon( RESPATH "images/view-refresh.png" ) );
|
||||
m_reset->setIcon( ImageRegistry::instance()->icon( RESPATH "images/view-refresh.svg" ) );
|
||||
m_reset->setToolTip( tr( "Reset all steering commands" ) );
|
||||
m_layout->addWidget( m_reset );
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "DynamicControlWrapper.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/dynamic/DynamicControl.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "widgets/ElidedLabel.h"
|
||||
#include "Source.h"
|
||||
@ -100,7 +101,7 @@ CollapsibleControls::init()
|
||||
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" ) );
|
||||
m_summaryExpand->setIcon( ImageRegistry::instance()->icon( RESPATH "images/arrow-down-double.svg" ) );
|
||||
m_expandL = new QStackedLayout;
|
||||
m_expandL->setContentsMargins( 0, 0, 0, 0 );
|
||||
m_expandL->setMargin( 0 );
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "DynamicControlWrapper.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Source.h"
|
||||
@ -57,7 +58,6 @@ DynamicControlList::DynamicControlList( const geninterface_ptr& generator, const
|
||||
|
||||
DynamicControlList::~DynamicControlList()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ DynamicControlList::init()
|
||||
m_collapseLayout->addWidget( m_collapse );
|
||||
m_addControl = new QToolButton( this );
|
||||
m_addControl->setAttribute( Qt::WA_LayoutUsesWidgetRect );
|
||||
m_addControl->setIcon( QIcon( RESPATH "images/list-add.png" ) );
|
||||
m_addControl->setIcon( ImageRegistry::instance()->icon( RESPATH "images/list-add.svg" ) );
|
||||
m_addControl->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
m_addControl->setIconSize( QSize( 16, 16 ) );
|
||||
m_addControl->setToolButtonStyle( Qt::ToolButtonIconOnly );
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "DynamicControlWrapper.h"
|
||||
|
||||
#include "playlist/dynamic/DynamicControl.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
@ -42,15 +42,13 @@ DynamicControlWrapper::DynamicControlWrapper( const Tomahawk::dyncontrol_ptr& co
|
||||
, m_typeSelector( 0 )
|
||||
, m_layout( QWeakPointer< QGridLayout >( layout ) )
|
||||
{
|
||||
qDebug() << "CREATING DYNAMIC CONTROL WRAPPER WITH ROW:" << row << layout;
|
||||
|
||||
m_typeSelector = new QComboBox( m_parent );
|
||||
|
||||
m_matchSelector = QWeakPointer<QWidget>( control->matchSelector() );
|
||||
m_entryWidget = QWeakPointer<QWidget>( control->inputField() );
|
||||
|
||||
m_minusButton = initButton( m_parent );
|
||||
m_minusButton->setIcon( QIcon( RESPATH "images/list-remove.png" ) );
|
||||
m_minusButton->setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::ListRemove ) );
|
||||
connect( m_minusButton, SIGNAL( clicked( bool ) ), this, SIGNAL( removeControl() ) );
|
||||
|
||||
m_plusL = new QStackedLayout();
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "playlist/dynamic/DynamicView.h"
|
||||
#include "DynamicSetupWidget.h"
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
@ -517,7 +518,7 @@ QPixmap
|
||||
DynamicWidget::pixmap() const
|
||||
{
|
||||
if ( m_playlist->mode() == OnDemand )
|
||||
return QPixmap( RESPATH "images/station.png" );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station );
|
||||
else if ( m_playlist->mode() == Static )
|
||||
return QPixmap( RESPATH "images/automatic-playlist.png" );
|
||||
else
|
||||
|
@ -48,6 +48,7 @@ namespace TomahawkUtils
|
||||
DefaultArtistImage,
|
||||
DefaultTrackImage,
|
||||
DefaultSourceAvatar,
|
||||
DefaultCollection,
|
||||
DefaultResolver,
|
||||
NowPlayingSpeaker,
|
||||
NowPlayingSpeakerDark,
|
||||
@ -75,7 +76,33 @@ namespace TomahawkUtils
|
||||
Share,
|
||||
NotLoved,
|
||||
Loved,
|
||||
Configure
|
||||
Configure,
|
||||
GreenDot,
|
||||
AddContact,
|
||||
SubscribeOn,
|
||||
SubscribeOff,
|
||||
JumpLink,
|
||||
ProcessStop,
|
||||
HeadphonesOn,
|
||||
HeadphonesOff,
|
||||
PadlockClosed,
|
||||
PadlockOpen,
|
||||
Downloading,
|
||||
Uploading,
|
||||
ViewRefresh,
|
||||
SuperCollection,
|
||||
LovedPlaylist,
|
||||
NewReleases,
|
||||
NewAdditions,
|
||||
Charts,
|
||||
Station,
|
||||
Playlist,
|
||||
ListRemove,
|
||||
ListAdd,
|
||||
AdvancedSettings,
|
||||
AccountSettings,
|
||||
MusicSettings,
|
||||
Invalid
|
||||
};
|
||||
|
||||
enum ImageMode
|
||||
|
@ -101,13 +101,13 @@ createDragPixmap( MediaType type, int itemCount )
|
||||
switch ( type )
|
||||
{
|
||||
case MediaTypeArtist:
|
||||
pixmap = QPixmap( ":/data/images/artist-icon.png" ).scaledToWidth( size, Qt::SmoothTransformation );
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::Original, QSize( size, size ) );
|
||||
break;
|
||||
case MediaTypeAlbum:
|
||||
pixmap = QPixmap( ":/data/images/album-icon.png" ).scaledToWidth( size, Qt::SmoothTransformation );
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::Original, QSize( size, size ) );
|
||||
break;
|
||||
case MediaTypeTrack:
|
||||
pixmap = QPixmap( QString( ":/data/images/track-icon-%2x%2.png" ).arg( size ) );
|
||||
pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Original, QSize( size, size ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -420,21 +420,21 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
else if ( mode == Grid )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/album-placeholder-grid.svg", size );
|
||||
else
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/no-album-no-case.svg", size );
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/album-icon.svg", size );
|
||||
break;
|
||||
|
||||
case DefaultArtistImage:
|
||||
if ( mode == Grid )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/artist-placeholder-grid.svg", size );
|
||||
else
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/no-artist-image-placeholder.svg", size );
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/artist-icon.png", size );
|
||||
break;
|
||||
|
||||
case DefaultTrackImage:
|
||||
if ( mode == Grid )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/track-placeholder-grid.svg", size );
|
||||
else
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/track-placeholder.png", size );
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/track-icon.svg", size );
|
||||
break;
|
||||
|
||||
case DefaultSourceAvatar:
|
||||
@ -451,6 +451,10 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/resolver-default.svg", size );
|
||||
break;
|
||||
|
||||
case DefaultCollection:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/collection.svg", size );
|
||||
break;
|
||||
|
||||
case NowPlayingSpeaker:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/now-playing-speaker.svg", size );
|
||||
break;
|
||||
@ -545,6 +549,93 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/configure.svg", size );
|
||||
break;
|
||||
|
||||
case GreenDot:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/green-dot.svg", size );
|
||||
break;
|
||||
|
||||
case AddContact:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/add-contact.svg", size );
|
||||
break;
|
||||
|
||||
case SubscribeOn:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/subscribe-on.svg", size );
|
||||
break;
|
||||
case SubscribeOff:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/subscribe-off.svg", size );
|
||||
break;
|
||||
|
||||
case JumpLink:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/jump-link.svg", size );
|
||||
break;
|
||||
|
||||
case ProcessStop:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/process-stop.svg", size );
|
||||
break;
|
||||
|
||||
case HeadphonesOn:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/headphones.svg", size );
|
||||
break;
|
||||
case HeadphonesOff:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/headphones-off.png", size );
|
||||
break;
|
||||
|
||||
case PadlockClosed:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/closed-padlock.png", size );
|
||||
break;
|
||||
case PadlockOpen:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/open-padlock.svg", size );
|
||||
break;
|
||||
|
||||
case Downloading:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/downloading.svg", size );
|
||||
break;
|
||||
case Uploading:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/uploading.svg", size );
|
||||
break;
|
||||
|
||||
case ViewRefresh:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/view-refresh.svg", size );
|
||||
break;
|
||||
|
||||
case SuperCollection:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/supercollection.svg", size );
|
||||
break;
|
||||
case LovedPlaylist:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/loved_playlist.svg", size );
|
||||
break;
|
||||
case NewReleases:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/new-releases.svg", size );
|
||||
break;
|
||||
case NewAdditions:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/new-additions.svg", size );
|
||||
break;
|
||||
case Charts:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/charts.svg", size );
|
||||
break;
|
||||
case Station:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/station.svg", size );
|
||||
break;
|
||||
case Playlist:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/playlist-icon.svg", size );
|
||||
break;
|
||||
|
||||
case ListAdd:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/list-add.svg", size );
|
||||
break;
|
||||
case ListRemove:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/list-remove.svg", size );
|
||||
break;
|
||||
|
||||
case AdvancedSettings:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/advanced-settings.svg", size );
|
||||
break;
|
||||
case AccountSettings:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/account-settings.svg", size );
|
||||
break;
|
||||
case MusicSettings:
|
||||
pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/music-settings.svg", size );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ NewReleasesWidget::NewReleasesWidget( QWidget* parent )
|
||||
m_sortedProxy->setDynamicSortFilter( true );
|
||||
m_sortedProxy->setFilterCaseSensitivity( Qt::CaseInsensitive );
|
||||
|
||||
ui->breadCrumbLeft->setRootIcon( QPixmap( RESPATH "images/new-releases.png" ) );
|
||||
ui->breadCrumbLeft->setRootIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::NewReleases, TomahawkUtils::Original ) );
|
||||
|
||||
connect( ui->breadCrumbLeft, SIGNAL( activateIndex( QModelIndex ) ), SLOT( leftCrumbIndexChanged(QModelIndex) ) );
|
||||
|
||||
|
@ -93,7 +93,6 @@ QueryLabel::init()
|
||||
m_mode = Qt::ElideMiddle;
|
||||
|
||||
m_jumpLinkVisible = false;
|
||||
m_jumpPixmap = QPixmap( RESPATH "images/jump-link.png" ).scaled( QSize( fontMetrics().height(), fontMetrics().height() ), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
}
|
||||
|
||||
|
||||
@ -475,7 +474,7 @@ QueryLabel::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
r.adjust( 6, 0, 0, 0 );
|
||||
r.setWidth( r.height() );
|
||||
p.drawPixmap( r, m_jumpPixmap.scaled( r.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation ) );
|
||||
p.drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::JumpLink, TomahawkUtils::Original, r.size() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -635,7 +634,7 @@ QueryLabel::mouseMoveEvent( QMouseEvent* event )
|
||||
hoverArea.setLeft( albumX + spacing );
|
||||
hoverArea.setRight( trackX + contentsMargins().left() - 1 );
|
||||
}
|
||||
else if ( m_jumpLinkVisible && x < trackX + 6 + m_jumpPixmap.width() && x > trackX + 6 )
|
||||
else if ( m_jumpLinkVisible && x < trackX + 6 + fm.height() && x > trackX + 6 )
|
||||
{
|
||||
m_hoverType = Complete;
|
||||
}
|
||||
|
@ -145,7 +145,6 @@ private:
|
||||
QMargins m_textMargins;
|
||||
|
||||
bool m_jumpLinkVisible;
|
||||
QPixmap m_jumpPixmap;
|
||||
};
|
||||
|
||||
#endif // QUERYLABEL_H
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
#include "SourceTreePopupDialog.h"
|
||||
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
@ -33,9 +31,12 @@
|
||||
#include <QTimer>
|
||||
|
||||
#ifdef QT_MAC_USE_COCOA
|
||||
#include "SourceTreePopupDialog_mac.h"
|
||||
#include "SourceTreePopupDialog_mac.h"
|
||||
#endif
|
||||
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
SourceTreePopupDialog::SourceTreePopupDialog()
|
||||
@ -69,8 +70,8 @@ SourceTreePopupDialog::SourceTreePopupDialog()
|
||||
m_label = new QLabel( this );
|
||||
m_buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
|
||||
|
||||
m_buttons->button( QDialogButtonBox::Ok )->setIcon( QIcon( RESPATH "images/delete.png" ) );
|
||||
m_buttons->button( QDialogButtonBox::Cancel )->setIcon( QIcon( RESPATH "images/cancel.png" ) );
|
||||
m_buttons->button( QDialogButtonBox::Ok )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/delete.svg" ) );
|
||||
m_buttons->button( QDialogButtonBox::Cancel )->setIcon( ImageRegistry::instance()->icon( RESPATH "images/cancel.svg" ) );
|
||||
|
||||
connect( m_buttons, SIGNAL( accepted() ), this, SLOT( onAccepted() ) );
|
||||
connect( m_buttons, SIGNAL( rejected() ), this, SLOT( onRejected() ) );
|
||||
|
@ -304,16 +304,16 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
figFont.setPointSize( TomahawkUtils::defaultFontSize() - 1 );
|
||||
|
||||
QPixmap icon;
|
||||
RecentlyPlayedPlaylistsModel::PlaylistTypes type = (RecentlyPlayedPlaylistsModel::PlaylistTypes)index.data( RecentlyPlayedPlaylistsModel::PlaylistTypeRole ).toInt();
|
||||
if( type == RecentlyPlayedPlaylistsModel::StaticPlaylist )
|
||||
icon = m_playlistIcon;
|
||||
else if( type == RecentlyPlayedPlaylistsModel::AutoPlaylist )
|
||||
icon = m_autoIcon;
|
||||
else if( type == RecentlyPlayedPlaylistsModel::Station )
|
||||
icon = m_stationIcon;
|
||||
|
||||
QRect pixmapRect = option.rect.adjusted( 10, 14, -option.rect.width() + option.rect.height() - 18, -14 );
|
||||
icon = icon.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
RecentlyPlayedPlaylistsModel::PlaylistTypes type = (RecentlyPlayedPlaylistsModel::PlaylistTypes)index.data( RecentlyPlayedPlaylistsModel::PlaylistTypeRole ).toInt();
|
||||
|
||||
if ( type == RecentlyPlayedPlaylistsModel::StaticPlaylist )
|
||||
icon = TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist, TomahawkUtils::Original, pixmapRect.size() );
|
||||
else if ( type == RecentlyPlayedPlaylistsModel::AutoPlaylist )
|
||||
icon = m_autoIcon;
|
||||
else if ( type == RecentlyPlayedPlaylistsModel::Station )
|
||||
icon = TomahawkUtils::defaultPixmap( TomahawkUtils::Station, TomahawkUtils::Original, pixmapRect.size() );
|
||||
|
||||
painter->drawPixmap( pixmapRect, icon );
|
||||
|
||||
if ( type != RecentlyPlayedPlaylistsModel::Station )
|
||||
@ -341,7 +341,7 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
QRect r( option.rect.width() - option.fontMetrics.height() * 2.5 - 10, option.rect.top() + option.rect.height() / 3 - option.fontMetrics.height(), option.fontMetrics.height() * 2.5, option.fontMetrics.height() * 2.5 );
|
||||
QPixmap avatar = index.data( RecentlyPlayedPlaylistsModel::PlaylistRole ).value< Tomahawk::playlist_ptr >()->author()->avatar( TomahawkUtils::RoundedCorners, r.size() );
|
||||
if ( avatar.isNull() )
|
||||
avatar = m_defaultAvatar;
|
||||
avatar = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultSourceAvatar, TomahawkUtils::RoundedCorners, r.size() );
|
||||
painter->drawPixmap( r, avatar );
|
||||
|
||||
painter->setFont( font );
|
||||
|
@ -51,10 +51,7 @@ Q_OBJECT
|
||||
public:
|
||||
PlaylistDelegate()
|
||||
{
|
||||
m_playlistIcon = QPixmap( RESPATH "images/playlist-icon.png" );
|
||||
m_autoIcon = QPixmap( RESPATH "images/automatic-playlist.png" );
|
||||
m_stationIcon = QPixmap( RESPATH "images/station.png" );
|
||||
m_defaultAvatar = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultSourceAvatar, TomahawkUtils::RoundedCorners );
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -62,7 +59,7 @@ protected:
|
||||
QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
|
||||
private:
|
||||
QPixmap m_playlistIcon, m_autoIcon, m_stationIcon, m_defaultAvatar;
|
||||
QPixmap m_autoIcon;
|
||||
};
|
||||
|
||||
|
||||
|
@ -75,7 +75,7 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent )
|
||||
m_sortedProxy->setDynamicSortFilter( true );
|
||||
m_sortedProxy->setFilterCaseSensitivity( Qt::CaseInsensitive );
|
||||
|
||||
ui->breadCrumbLeft->setRootIcon( QPixmap( RESPATH "images/charts.png" ) );
|
||||
ui->breadCrumbLeft->setRootIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::Charts, TomahawkUtils::Original ) );
|
||||
|
||||
connect( ui->breadCrumbLeft, SIGNAL( activateIndex( QModelIndex ) ), SLOT( leftCrumbIndexChanged( QModelIndex ) ) );
|
||||
|
||||
|
@ -76,8 +76,6 @@ SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget*
|
||||
{
|
||||
m_description = tr( "Recent activity from %1" ).arg( source->friendlyName() );
|
||||
}
|
||||
|
||||
m_pixmap.load( RESPATH "images/new-additions.png" );
|
||||
}
|
||||
|
||||
|
||||
@ -115,3 +113,11 @@ SourceInfoWidget::changeEvent( QEvent* e )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
SourceInfoWidget::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::NewAdditions, TomahawkUtils::Original );
|
||||
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
|
||||
virtual QString title() const { return m_title; }
|
||||
virtual QString description() const { return m_description; }
|
||||
virtual QPixmap pixmap() const { return m_pixmap; }
|
||||
virtual QPixmap pixmap() const;
|
||||
|
||||
virtual bool jumpToCurrentTrack() { return false; }
|
||||
|
||||
@ -73,7 +73,6 @@ private:
|
||||
|
||||
QString m_title;
|
||||
QString m_description;
|
||||
QPixmap m_pixmap;
|
||||
};
|
||||
|
||||
#endif // SOURCEINFOWIDGET_H
|
||||
|
@ -67,12 +67,6 @@ SourceDelegate::SourceDelegate( QAbstractItemView* parent )
|
||||
m_dropTypeImageMap.insert( 4, QPixmap( RESPATH "images/drop-top-songs.png" ).scaledToWidth( 32, Qt::SmoothTransformation ) );
|
||||
|
||||
m_dropMimeData = new QMimeData();
|
||||
|
||||
m_headphonesOff.load( RESPATH "images/headphones-off.png" );
|
||||
m_headphonesOn.load( RESPATH "images/headphones-sidebar.png" );
|
||||
m_realtimeLocked.load( RESPATH "images/closed-padlock.png" );
|
||||
m_realtimeUnlocked.load( RESPATH "images/open-padlock.png" );
|
||||
m_collaborativeOn.load( RESPATH "images/green-dot.png" );
|
||||
}
|
||||
|
||||
|
||||
@ -220,29 +214,29 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem&
|
||||
if ( isPlaying || ( !colItem->source().isNull() && colItem->source()->isLocal() ) )
|
||||
{
|
||||
// Show a listen icon
|
||||
QPixmap listenAlongPixmap;
|
||||
QPixmap realtimeListeningAlongPixmap;
|
||||
TomahawkUtils::ImageType listenAlongPixmap = TomahawkUtils::Invalid;
|
||||
TomahawkUtils::ImageType realtimeListeningAlongPixmap = TomahawkUtils::Invalid;
|
||||
if ( index.data( SourcesModel::LatchedOnRole ).toBool() )
|
||||
{
|
||||
// Currently listening along
|
||||
listenAlongPixmap = m_headphonesOn;
|
||||
listenAlongPixmap = TomahawkUtils::HeadphonesOn;
|
||||
if ( !colItem->source()->isLocal() )
|
||||
{
|
||||
realtimeListeningAlongPixmap =
|
||||
colItem->source()->playlistInterface()->latchMode() == Tomahawk::PlaylistModes::RealTime ?
|
||||
m_realtimeLocked : m_realtimeUnlocked;
|
||||
TomahawkUtils::PadlockClosed : TomahawkUtils::PadlockOpen;
|
||||
}
|
||||
}
|
||||
else if ( !colItem->source()->isLocal() )
|
||||
{
|
||||
listenAlongPixmap = m_headphonesOff;
|
||||
listenAlongPixmap = TomahawkUtils::HeadphonesOff;
|
||||
}
|
||||
|
||||
if ( !listenAlongPixmap.isNull() )
|
||||
if ( listenAlongPixmap != TomahawkUtils::Invalid )
|
||||
{
|
||||
QRect pmRect = textRect;
|
||||
pmRect.setRight( pmRect.left() + pmRect.height() );
|
||||
painter->drawPixmap( pmRect, listenAlongPixmap.scaledToHeight( pmRect.height(), Qt::SmoothTransformation ) );
|
||||
painter->drawPixmap( pmRect, TomahawkUtils::defaultPixmap( listenAlongPixmap, TomahawkUtils::Original, pmRect.size() ) );
|
||||
textRect.adjust( pmRect.width() + 3, 0, 0, 0 );
|
||||
|
||||
m_headphoneRects[ index ] = pmRect;
|
||||
@ -250,11 +244,11 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem&
|
||||
else
|
||||
m_headphoneRects.remove( index );
|
||||
|
||||
if ( !realtimeListeningAlongPixmap.isNull() )
|
||||
if ( realtimeListeningAlongPixmap != TomahawkUtils::Invalid )
|
||||
{
|
||||
QRect pmRect = textRect;
|
||||
pmRect.setRight( pmRect.left() + pmRect.height() );
|
||||
painter->drawPixmap( pmRect, realtimeListeningAlongPixmap.scaledToHeight( pmRect.height(), Qt::SmoothTransformation ) );
|
||||
painter->drawPixmap( pmRect, TomahawkUtils::defaultPixmap( realtimeListeningAlongPixmap, TomahawkUtils::Original, pmRect.size() ) );
|
||||
textRect.adjust( pmRect.width() + 3, 0, 0, 0 );
|
||||
|
||||
m_lockRects[ index ] = pmRect;
|
||||
@ -568,11 +562,8 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
QStyledItemDelegate::paint( painter, o, index );
|
||||
|
||||
// draw close icon
|
||||
QPixmap p( RESPATH "images/list-remove.png" );
|
||||
p = p.scaledToHeight( m_iconHeight, Qt::SmoothTransformation );
|
||||
|
||||
QRect r( o3.rect.right() - padding - m_iconHeight, padding + o3.rect.y(), m_iconHeight, m_iconHeight );
|
||||
painter->drawPixmap( r, p );
|
||||
painter->drawPixmap( r, TomahawkUtils::defaultPixmap( TomahawkUtils::ListRemove, TomahawkUtils::Original, r.size() ) );
|
||||
}
|
||||
else
|
||||
QStyledItemDelegate::paint( painter, o, index );
|
||||
@ -585,20 +576,20 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
if ( plItem->canSubscribe() && !plItem->subscribedIcon().isNull() )
|
||||
{
|
||||
const int padding = 2;
|
||||
const int imgWidth = o.rect.height() - 2*padding;
|
||||
const int imgWidth = o.rect.height() - 2 * padding;
|
||||
|
||||
const QPixmap icon = plItem->subscribedIcon().scaled( imgWidth, imgWidth, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
const QRect subRect( o.rect.right() - padding - imgWidth, o.rect.top() + padding, imgWidth, imgWidth );
|
||||
painter->drawPixmap( subRect, icon );
|
||||
}
|
||||
|
||||
if ( plItem->collaborative() )
|
||||
{
|
||||
const int imgWidth = m_collaborativeOn.size().width();
|
||||
const int padding = 2;
|
||||
const int imgWidth = o.rect.height() - 2 * padding;
|
||||
const QRect subRect( o.rect.left(), o.rect.top(), imgWidth, imgWidth );
|
||||
painter->drawPixmap( subRect, m_collaborativeOn );
|
||||
|
||||
painter->drawPixmap( subRect, TomahawkUtils::defaultPixmap( TomahawkUtils::GreenDot, TomahawkUtils::Original, subRect.size() ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -72,7 +72,6 @@ private:
|
||||
QMimeData* m_dropMimeData;
|
||||
mutable SourceTreeItem::DropType m_hoveredDropType; // Hack to keep easily track of the current highlighted DropType in paint()
|
||||
QMap< QModelIndex, AnimationHelper* > m_expandedMap;
|
||||
QPixmap m_headphonesOn, m_headphonesOff, m_realtimeLocked, m_realtimeUnlocked, m_collaborativeOn;
|
||||
qint64 m_lastClicked;
|
||||
QMap< int, SourceTreeItem::DropType > m_dropTypeMap;
|
||||
QMap< int, QString > m_dropTypeTextMap;
|
||||
|
@ -20,6 +20,11 @@
|
||||
|
||||
#include "sourcetree/SourcesModel.h"
|
||||
|
||||
#include <QMimeData>
|
||||
#include <QSize>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "sourcetree/items/SourceTreeItem.h"
|
||||
#include "sourcetree/items/SourceItem.h"
|
||||
#include "sourcetree/items/GroupItem.h"
|
||||
@ -31,19 +36,14 @@
|
||||
#include "Collection.h"
|
||||
#include "Source.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "GlobalActionManager.h"
|
||||
#include "DropJob.h"
|
||||
#include "items/PlaylistItems.h"
|
||||
#include "playlist/TreeView.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/dynamic/widgets/DynamicWidget.h"
|
||||
|
||||
#include <QMimeData>
|
||||
#include <QSize>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@ -282,13 +282,13 @@ SourcesModel::appendGroups()
|
||||
// new SourceTreeItem( this, m_rootItem, SourcesModel::Divider, 2 );
|
||||
m_myMusicGroup = new GroupItem( this, m_rootItem, tr( "My Music" ), 3 );
|
||||
|
||||
GenericPageItem* dashboard = new GenericPageItem( this, browse, tr( "Dashboard" ), QIcon( RESPATH "images/dashboard.png" ),
|
||||
GenericPageItem* dashboard = new GenericPageItem( this, browse, tr( "Dashboard" ), ImageRegistry::instance()->icon( RESPATH "images/dashboard.svg" ),
|
||||
boost::bind( &ViewManager::showWelcomePage, ViewManager::instance() ),
|
||||
boost::bind( &ViewManager::welcomeWidget, ViewManager::instance() ) );
|
||||
dashboard->setSortValue( 0 );
|
||||
|
||||
// super collection
|
||||
GenericPageItem* sc = new GenericPageItem( this, browse, tr( "SuperCollection" ), QIcon( RESPATH "images/supercollection.png" ),
|
||||
GenericPageItem* sc = new GenericPageItem( this, browse, tr( "SuperCollection" ), ImageRegistry::instance()->icon( RESPATH "images/supercollection.svg" ),
|
||||
boost::bind( &ViewManager::showSuperCollection, ViewManager::instance() ),
|
||||
boost::bind( &ViewManager::superCollectionView, ViewManager::instance() ) );
|
||||
sc->setSortValue( 1 );
|
||||
@ -302,12 +302,12 @@ SourcesModel::appendGroups()
|
||||
boost::bind( &ViewManager::recentPlaysWidget, ViewManager::instance() ) );
|
||||
recent->setSortValue( 3 );
|
||||
|
||||
GenericPageItem* hot = new GenericPageItem( this, browse, tr( "Charts" ), QIcon( RESPATH "images/charts.png" ),
|
||||
GenericPageItem* hot = new GenericPageItem( this, browse, tr( "Charts" ), ImageRegistry::instance()->icon( RESPATH "images/charts.svg" ),
|
||||
boost::bind( &ViewManager::showWhatsHotPage, ViewManager::instance() ),
|
||||
boost::bind( &ViewManager::whatsHotWidget, ViewManager::instance() ) );
|
||||
hot->setSortValue( 4 );
|
||||
|
||||
GenericPageItem* newReleases = new GenericPageItem( this, browse, tr( "New Releases" ), QIcon( RESPATH "images/new-releases.png" ),
|
||||
GenericPageItem* newReleases = new GenericPageItem( this, browse, tr( "New Releases" ), ImageRegistry::instance()->icon( RESPATH "images/new-releases.svg" ),
|
||||
boost::bind( &ViewManager::showNewReleasesPage, ViewManager::instance() ),
|
||||
boost::bind( &ViewManager::newReleasesWidget, ViewManager::instance() ) );
|
||||
newReleases->setSortValue( 5 );
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "playlist/LovedTracksModel.h"
|
||||
#include "playlist/PlaylistLargeItemDelegate.h"
|
||||
|
||||
#include "utils/ImageRegistry.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
@ -60,7 +62,7 @@ LovedTracksItem::text() const
|
||||
QIcon
|
||||
LovedTracksItem::icon() const
|
||||
{
|
||||
return QIcon( RESPATH "images/loved_playlist.png" );
|
||||
return ImageRegistry::instance()->icon( RESPATH "images/loved_playlist.svg" );
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +73,7 @@ LovedTracksItem::activate()
|
||||
{
|
||||
SourceItem* par = dynamic_cast< SourceItem* >( parent() );
|
||||
FlexibleView* pv = new FlexibleView( ViewManager::instance()->widget() );
|
||||
pv->setPixmap( QPixmap( RESPATH "images/loved_playlist.png" ) );
|
||||
pv->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::LovedPlaylist, TomahawkUtils::Original, QSize( 128, 128 ) ) );
|
||||
|
||||
LovedTracksModel* raModel = new LovedTracksModel( pv );
|
||||
raModel->setTitle( text() );
|
||||
|
@ -21,15 +21,15 @@
|
||||
|
||||
#include "Query.h"
|
||||
#include "ViewManager.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "CategoryItems.h"
|
||||
#include "SourceItem.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "DropJob.h"
|
||||
#include "Source.h"
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QMimeData>
|
||||
#include <QPainter>
|
||||
@ -49,9 +49,7 @@ PlaylistItem::PlaylistItem( SourcesModel* mdl, SourceTreeItem* parent, const pla
|
||||
connect( pl.data(), SIGNAL( changed() ),
|
||||
SLOT( onUpdated() ), Qt::QueuedConnection );
|
||||
|
||||
m_icon = QIcon( RESPATH "images/playlist-icon.png" );
|
||||
|
||||
if( ViewManager::instance()->pageForPlaylist( pl ) )
|
||||
if ( ViewManager::instance()->pageForPlaylist( pl ) )
|
||||
model()->linkSourceItemToPage( this, ViewManager::instance()->pageForPlaylist( pl ) );
|
||||
|
||||
if ( !m_playlist->updaters().isEmpty() )
|
||||
@ -337,9 +335,9 @@ PlaylistItem::createOverlay()
|
||||
}
|
||||
|
||||
if ( m_canSubscribe && m_showSubscribed && m_subscribedOnIcon.isNull() )
|
||||
m_subscribedOnIcon = QPixmap( RESPATH "images/subscribe-on.png" );
|
||||
m_subscribedOnIcon = TomahawkUtils::defaultPixmap( TomahawkUtils::SubscribeOn, TomahawkUtils::Original, QSize( 20, 20 ) );
|
||||
else if ( m_canSubscribe && !m_showSubscribed && m_subscribedOffIcon.isNull() )
|
||||
m_subscribedOffIcon = QPixmap( RESPATH "images/subscribe-off.png" );
|
||||
m_subscribedOffIcon = TomahawkUtils::defaultPixmap( TomahawkUtils::SubscribeOff, TomahawkUtils::Original, QSize( 20, 20 ) );
|
||||
|
||||
QList< QPixmap > icons;
|
||||
foreach ( PlaylistUpdaterInterface* updater, m_playlist->updaters() )
|
||||
@ -359,8 +357,7 @@ PlaylistItem::createOverlay()
|
||||
if ( icons.size() > 2 )
|
||||
icons = icons.mid( 0, 2 );
|
||||
|
||||
|
||||
QPixmap base = m_icon.pixmap( 48, 48 );
|
||||
QPixmap base = TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist, TomahawkUtils::Original, QSize( 48, 48 ) );
|
||||
QPainter p( &base );
|
||||
const int w = base.width() / 2;
|
||||
QRect overlayRect( base.rect().right() - w, base.rect().height() - w, w, w );
|
||||
@ -388,7 +385,7 @@ PlaylistItem::icon() const
|
||||
if ( !m_overlaidIcon.isNull() )
|
||||
return m_overlaidIcon;
|
||||
else
|
||||
return m_icon;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist, TomahawkUtils::Original, QSize( 48, 48 ) );
|
||||
}
|
||||
|
||||
|
||||
@ -451,10 +448,9 @@ DynamicPlaylistItem::DynamicPlaylistItem( SourcesModel* mdl, SourceTreeItem* par
|
||||
connect( pl.data(), SIGNAL( dynamicRevisionLoaded( Tomahawk::DynamicPlaylistRevision ) ),
|
||||
SLOT( onDynamicPlaylistLoaded( Tomahawk::DynamicPlaylistRevision ) ), Qt::QueuedConnection );
|
||||
|
||||
m_stationIcon = QIcon( RESPATH "images/station.png" );
|
||||
m_automaticPlaylistIcon = QIcon( RESPATH "images/automatic-playlist.png" );
|
||||
|
||||
if( ViewManager::instance()->pageForDynPlaylist( pl ) )
|
||||
if ( ViewManager::instance()->pageForDynPlaylist( pl ) )
|
||||
model()->linkSourceItemToPage( this, ViewManager::instance()->pageForDynPlaylist( pl ) );
|
||||
}
|
||||
|
||||
@ -580,7 +576,7 @@ DynamicPlaylistItem::icon() const
|
||||
{
|
||||
if ( m_dynplaylist->mode() == OnDemand )
|
||||
{
|
||||
return m_stationIcon;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station, TomahawkUtils::Original );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ private:
|
||||
|
||||
bool m_loaded, m_canSubscribe, m_showSubscribed;
|
||||
Tomahawk::playlist_ptr m_playlist;
|
||||
QIcon m_icon, m_overlaidIcon;
|
||||
QIcon m_overlaidIcon;
|
||||
QPixmap m_subscribedOnIcon, m_subscribedOffIcon;
|
||||
QList<Tomahawk::PlaylistUpdaterInterface*> m_overlaidUpdaters;
|
||||
};
|
||||
@ -100,7 +100,6 @@ private:
|
||||
|
||||
Tomahawk::dynplaylist_ptr m_dynplaylist;
|
||||
|
||||
QIcon m_stationIcon;
|
||||
QIcon m_automaticPlaylistIcon;
|
||||
};
|
||||
|
||||
|
@ -58,11 +58,10 @@ SourceItem::SourceItem( SourcesModel* mdl, SourceTreeItem* parent, const Tomahaw
|
||||
{
|
||||
if ( m_source.isNull() )
|
||||
{
|
||||
m_superCol = TomahawkUtils::createRoundedImage( QPixmap( RESPATH "images/supercollection.png" ), QSize( 0, 0 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
m_collectionItem = new GenericPageItem( model(), this, tr( "Collection" ), QIcon( RESPATH "images/collection.png" ), //FIXME different icon
|
||||
m_collectionItem = new GenericPageItem( model(), this, tr( "Collection" ), ImageRegistry::instance()->icon( RESPATH "images/collection.svg" ), //FIXME different icon
|
||||
boost::bind( &SourceItem::collectionClicked, this ),
|
||||
boost::bind( &SourceItem::getCollectionPage, this ) );
|
||||
|
||||
@ -70,7 +69,7 @@ SourceItem::SourceItem( SourcesModel* mdl, SourceTreeItem* parent, const Tomahaw
|
||||
boost::bind( &SourceItem::sourceInfoClicked, this ),
|
||||
boost::bind( &SourceItem::getSourceInfoPage, this ) );*/
|
||||
|
||||
m_latestAdditionsItem = new GenericPageItem( model(), this, tr( "Latest Additions" ), QIcon( RESPATH "images/new-additions.png" ),
|
||||
m_latestAdditionsItem = new GenericPageItem( model(), this, tr( "Latest Additions" ), ImageRegistry::instance()->icon( RESPATH "images/new-additions.svg" ),
|
||||
boost::bind( &SourceItem::latestAdditionsClicked, this ),
|
||||
boost::bind( &SourceItem::getLatestAdditionsPage, this ) );
|
||||
|
||||
@ -198,7 +197,7 @@ SourceItem::pixmap( const QSize& size ) const
|
||||
{
|
||||
if ( m_source.isNull() )
|
||||
{
|
||||
return m_superCol;
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::SuperCollection, TomahawkUtils::Original, size );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -517,7 +516,7 @@ SourceItem::latestAdditionsClicked()
|
||||
if ( !m_latestAdditionsPage )
|
||||
{
|
||||
FlexibleView* pv = new FlexibleView( ViewManager::instance()->widget() );
|
||||
pv->setPixmap( QPixmap( RESPATH "images/new-additions.png" ) );
|
||||
pv->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::NewAdditions, TomahawkUtils::Original ) );
|
||||
|
||||
RecentlyAddedModel* raModel = new RecentlyAddedModel( pv );
|
||||
raModel->setTitle( tr( "Latest Additions" ) );
|
||||
|
@ -92,7 +92,6 @@ private:
|
||||
void playlistDeletedInternal( SourceTreeItem* parent, const T& playlists );
|
||||
|
||||
Tomahawk::source_ptr m_source;
|
||||
QPixmap m_superCol;
|
||||
CategoryItem* m_playlists;
|
||||
CategoryItem* m_stations;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "widgets/infowidgets/ArtistInfoWidget.h"
|
||||
#include "widgets/infowidgets/TrackInfoWidget.h"
|
||||
#include "widgets/SearchWidget.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Closure.h"
|
||||
|
||||
#include <QAction>
|
||||
@ -41,7 +42,7 @@ using namespace Tomahawk;
|
||||
TemporaryPageItem::TemporaryPageItem ( SourcesModel* mdl, SourceTreeItem* parent, ViewPage* page, int sortValue )
|
||||
: SourceTreeItem( mdl, parent, SourcesModel::TemporaryPage )
|
||||
, m_page( page )
|
||||
, m_icon( QIcon( RESPATH "images/playlist-icon.png" ) )
|
||||
, m_icon( ImageRegistry::instance()->icon( RESPATH "images/playlist-icon.svg" ) )
|
||||
, m_sortValue( sortValue )
|
||||
{
|
||||
QAction* action = 0;
|
||||
@ -51,21 +52,21 @@ TemporaryPageItem::TemporaryPageItem ( SourcesModel* mdl, SourceTreeItem* parent
|
||||
action = new QAction( tr( "Copy Artist Link" ), this );
|
||||
action->setProperty( "linkType", (int)ArtistLink );
|
||||
|
||||
m_icon = QIcon( RESPATH "images/artist-icon.png" );
|
||||
m_icon = ImageRegistry::instance()->icon( RESPATH "images/artist-icon.svg" );
|
||||
}
|
||||
else if ( dynamic_cast< AlbumInfoWidget* >( page ) )
|
||||
{
|
||||
action = new QAction( tr( "Copy Album Link" ), this );
|
||||
action->setProperty( "linkType", (int)AlbumLink );
|
||||
|
||||
m_icon = QIcon( RESPATH "images/album-icon.png" );
|
||||
m_icon = ImageRegistry::instance()->icon( RESPATH "images/album-icon.svg" );
|
||||
}
|
||||
else if ( dynamic_cast< TrackInfoWidget* >( page ) )
|
||||
{
|
||||
action = new QAction( tr( "Copy Track Link" ), this );
|
||||
action->setProperty( "linkType", (int)TrackLink );
|
||||
|
||||
m_icon = QIcon( RESPATH "images/track-icon-sidebar.png" );
|
||||
m_icon = ImageRegistry::instance()->icon( RESPATH "images/track-icon.svg" );
|
||||
}
|
||||
else if ( dynamic_cast< SearchWidget* >( page ) )
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ AccountWidget::AccountWidget( QWidget* parent )
|
||||
|
||||
m_addAccountIcon = new QLabel( m_inviteContainer );
|
||||
m_addAccountIcon->setContentsMargins( 1, 0, 0, 0 );
|
||||
m_addAccountIcon->setPixmap( QIcon( RESPATH "images/add-contact.png" ).pixmap( 16 ) );
|
||||
m_addAccountIcon->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::AddContact, TomahawkUtils::Original, QSize( 16, 16 ) ) );
|
||||
m_addAccountIcon->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
m_addAccountIcon->setAlignment( Qt::AlignCenter );
|
||||
containerLayout->addWidget( m_addAccountIcon );
|
||||
|
@ -84,10 +84,9 @@ AccountsToolButton::AccountsToolButton( QWidget* parent )
|
||||
wMainLayout->addSpacing( 6 );
|
||||
|
||||
QPushButton *settingsButton = new QPushButton( w );
|
||||
settingsButton->setIcon( QIcon( RESPATH "images/account-settings.png" ) );
|
||||
settingsButton->setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::AccountSettings ) );
|
||||
settingsButton->setText( tr( "Configure Accounts" ) );
|
||||
connect( settingsButton, SIGNAL( clicked() ),
|
||||
window(), SLOT( showSettingsDialog() ) );
|
||||
connect( settingsButton, SIGNAL( clicked() ), window(), SLOT( showSettingsDialog() ) );
|
||||
|
||||
QHBoxLayout *bottomLayout = new QHBoxLayout( w );
|
||||
TomahawkUtils::unmarginLayout( bottomLayout );
|
||||
@ -95,12 +94,8 @@ AccountsToolButton::AccountsToolButton( QWidget* parent )
|
||||
bottomLayout->addWidget( settingsButton );
|
||||
wMainLayout->addLayout( bottomLayout );
|
||||
|
||||
|
||||
//ToolButton stuff
|
||||
m_defaultPixmap = QPixmap( RESPATH "images/account-none.png" )
|
||||
.scaled( iconSize(),
|
||||
Qt::KeepAspectRatio,
|
||||
Qt::SmoothTransformation );
|
||||
m_defaultPixmap = QPixmap( RESPATH "images/account-none.png" ).scaled( iconSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
connect( m_proxy, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ),
|
||||
this, SLOT( updateIcons() ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user