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:
@@ -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();
|
||||||
|
@@ -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 );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user