1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

* Set a different default size on OSX.

This commit is contained in:
Christian Muehlhaeuser
2012-09-01 16:46:04 +02:00
parent 4d3cad5ca1
commit 047f670980
4 changed files with 9 additions and 17 deletions

View File

@@ -196,8 +196,13 @@ TomahawkApp::init()
setQuitOnLastWindowClosed( false );
QFont f = font();
#ifdef Q_OS_MAC
f.setPointSize( f.pointSize() - 2 );
setFont( f );
#endif
tDebug() << "Default font:" << f.pixelSize() << f.pointSize() << f.pointSizeF() << f.family();
tDebug() << "Font heights:" << QFontMetrics( f ).height();
tDebug() << "Font height:" << QFontMetrics( f ).height();
TomahawkUtils::setDefaultFontSize( f.pointSize() );
#endif

View File

@@ -85,15 +85,8 @@ ContextWidget::ContextWidget( QWidget* parent )
ui->toggleButton->setPalette( whitePal );
ui->toggleButton->setCursor( Qt::PointingHandCursor );
QFont boldFont = ui->toggleButton->font();
boldFont.setPointSize( 10 );
boldFont.setBold( true );
ui->toggleButton->setFont( boldFont );
QFontMetrics fm( boldFont );
m_minHeight = fm.height() * 1.2;
ui->toggleButton->setMinimumHeight( fm.height() * 1.2 );
m_minHeight = TomahawkUtils::defaultFontHeight() * 1.4;
ui->toggleButton->setMinimumHeight( m_minHeight );
setAutoFillBackground( true );
setFixedHeight( m_minHeight );

View File

@@ -41,10 +41,7 @@ QueueView::QueueView( AnimatedSplitter* parent )
TomahawkUtils::unmarginLayout( layout() );
setContentsMargins( 0, 0, 0, 0 );
QFont f;
f.setPointSize( 10 );
QFontMetrics fm( f );
setHiddenSize( QSize( 0, fm.height() * 1.2 ) );
setHiddenSize( QSize( 0, TomahawkUtils::defaultFontHeight() * 1.4 ) );
ui->queue->setProxyModel( new QueueProxyModel( ui->queue ) );
ui->queue->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );

View File

@@ -69,9 +69,6 @@ SourceTreeView::SourceTreeView( QWidget* parent )
setContentsMargins( 0, 0, 0, 0 );
QFont fnt;
fnt.setPointSize( TomahawkUtils::defaultFontSize() - 2 );
setFont( fnt );
QFontMetrics fm( fnt );
// This is sort of the longest string in there. With translations
// we will never get it right so setting it to something reasonable for the average case