mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 12:21:52 +02:00
Use DpiScaler for ViewPage header icons.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "utils/TomahawkStyle.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/DpiScaler.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QScrollArea>
|
||||
@@ -285,5 +286,6 @@ Dashboard::changeEvent( QEvent* e )
|
||||
QPixmap
|
||||
Dashboard::pixmap() const
|
||||
{
|
||||
return ImageRegistry::instance()->pixmap( RESPATH "images/dashboard.svg", QSize( 256, 256 ) );
|
||||
return ImageRegistry::instance()->pixmap( RESPATH "images/dashboard.svg",
|
||||
TomahawkUtils::DpiScaler::scaled( this, 80, 80 ) );
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/TomahawkStyle.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/DpiScaler.h"
|
||||
#include "widgets/OverlayWidget.h"
|
||||
#include "widgets/PlaylistsModel.h"
|
||||
#include "widgets/RecentlyPlayedPlaylistsModel.h"
|
||||
@@ -266,7 +267,9 @@ NetworkActivityWidget::playlistInterface() const
|
||||
QPixmap
|
||||
NetworkActivityWidget::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::NetworkActivity, TomahawkUtils::Original, QSize( 256, 256 ) );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::NetworkActivity,
|
||||
TomahawkUtils::Original,
|
||||
TomahawkUtils::DpiScaler::scaled( this, 80, 80 ) );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "Source.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/DpiScaler.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -166,5 +167,7 @@ PlaylistView::onMenuTriggered( int action )
|
||||
QPixmap
|
||||
PlaylistView::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist, TomahawkUtils::Original, QSize( 256, 256 ) );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist,
|
||||
TomahawkUtils::Original,
|
||||
TomahawkUtils::DpiScaler::scaled( this, 80, 80 ) );
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/DpiScaler.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
@@ -518,9 +519,13 @@ QPixmap
|
||||
DynamicWidget::pixmap() const
|
||||
{
|
||||
if ( m_playlist->mode() == OnDemand )
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station, TomahawkUtils::Original, QSize( 256, 256 ) );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Station,
|
||||
TomahawkUtils::Original,
|
||||
TomahawkUtils::DpiScaler::scaled( this, 80, 80 ) );
|
||||
else if ( m_playlist->mode() == Static )
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::AutomaticPlaylist, TomahawkUtils::Original, QSize( 256, 256 ) );
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::AutomaticPlaylist,
|
||||
TomahawkUtils::Original,
|
||||
TomahawkUtils::DpiScaler::scaled( this, 80, 80 ) );
|
||||
else
|
||||
return QPixmap();
|
||||
}
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/DpiScaler.h"
|
||||
#include "TomahawkApp.h"
|
||||
|
||||
/// SourceItem
|
||||
@@ -601,7 +602,9 @@ SourceItem::latestAdditionsClicked()
|
||||
if ( !m_latestAdditionsPage )
|
||||
{
|
||||
FlexibleView* pv = new FlexibleView( ViewManager::instance()->widget() );
|
||||
pv->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::NewAdditions, TomahawkUtils::Original, QSize( 256, 256 ) ) );
|
||||
pv->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::NewAdditions,
|
||||
TomahawkUtils::Original,
|
||||
TomahawkUtils::DpiScaler::scaled( pv, 80, 80 ) ) );
|
||||
|
||||
RecentlyAddedModel* raModel = new RecentlyAddedModel( pv );
|
||||
raModel->setTitle( tr( "Latest Additions" ) );
|
||||
|
Reference in New Issue
Block a user