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

* Set application wide font in Tomahawk App directly. This might fix some DPI issues. Testing.

This commit is contained in:
Christian Muehlhaeuser
2014-08-21 16:53:21 +02:00
parent 690c25a929
commit 1d0dae488d
2 changed files with 4 additions and 6 deletions

View File

@@ -80,6 +80,7 @@
#include "ActionCollection.h" #include "ActionCollection.h"
#include "widgets/HeaderLabel.h" #include "widgets/HeaderLabel.h"
#include "TomahawkSettings.h" #include "TomahawkSettings.h"
#include "utils/TomahawkStyle.h"
#include "config.h" #include "config.h"
@@ -180,11 +181,13 @@ TomahawkApp::init()
updateSplashWidgetMessage( "Splash screen test\n2/7" ); updateSplashWidgetMessage( "Splash screen test\n2/7" );
} }
TomahawkStyle::loadFonts();
QFont f = font(); QFont f = font();
f.setFamily( "Roboto" );
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
f.setPointSize( f.pointSize() - 2 ); f.setPointSize( f.pointSize() - 2 );
setFont( f );
#endif #endif
setFont( f );
#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 ) #if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
tDebug() << "Default font:" << f.pixelSize() << f.pointSize() << f.pointSizeF() << f.family(); tDebug() << "Default font:" << f.pixelSize() << f.pointSize() << f.pointSizeF() << f.family();

View File

@@ -112,13 +112,8 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
, m_trayIcon( 0 ) , m_trayIcon( 0 )
, m_audioRetryCounter( 0 ) , m_audioRetryCounter( 0 )
{ {
TomahawkStyle::loadFonts();
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) ); setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
QFont f = font();
f.setFamily( "Roboto" );
QApplication::setFont( f );
ViewManager* vm = new ViewManager( this ); ViewManager* vm = new ViewManager( this );
m_audioControls = new AudioControls( this ); m_audioControls = new AudioControls( this );