mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Set a different default size on OSX.
This commit is contained in:
@@ -196,8 +196,13 @@ TomahawkApp::init()
|
|||||||
setQuitOnLastWindowClosed( false );
|
setQuitOnLastWindowClosed( false );
|
||||||
|
|
||||||
QFont f = font();
|
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() << "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() );
|
TomahawkUtils::setDefaultFontSize( f.pointSize() );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -85,15 +85,8 @@ ContextWidget::ContextWidget( QWidget* parent )
|
|||||||
ui->toggleButton->setPalette( whitePal );
|
ui->toggleButton->setPalette( whitePal );
|
||||||
ui->toggleButton->setCursor( Qt::PointingHandCursor );
|
ui->toggleButton->setCursor( Qt::PointingHandCursor );
|
||||||
|
|
||||||
QFont boldFont = ui->toggleButton->font();
|
m_minHeight = TomahawkUtils::defaultFontHeight() * 1.4;
|
||||||
boldFont.setPointSize( 10 );
|
ui->toggleButton->setMinimumHeight( m_minHeight );
|
||||||
boldFont.setBold( true );
|
|
||||||
ui->toggleButton->setFont( boldFont );
|
|
||||||
QFontMetrics fm( boldFont );
|
|
||||||
|
|
||||||
m_minHeight = fm.height() * 1.2;
|
|
||||||
|
|
||||||
ui->toggleButton->setMinimumHeight( fm.height() * 1.2 );
|
|
||||||
|
|
||||||
setAutoFillBackground( true );
|
setAutoFillBackground( true );
|
||||||
setFixedHeight( m_minHeight );
|
setFixedHeight( m_minHeight );
|
||||||
|
@@ -41,10 +41,7 @@ QueueView::QueueView( AnimatedSplitter* parent )
|
|||||||
TomahawkUtils::unmarginLayout( layout() );
|
TomahawkUtils::unmarginLayout( layout() );
|
||||||
setContentsMargins( 0, 0, 0, 0 );
|
setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
|
||||||
QFont f;
|
setHiddenSize( QSize( 0, TomahawkUtils::defaultFontHeight() * 1.4 ) );
|
||||||
f.setPointSize( 10 );
|
|
||||||
QFontMetrics fm( f );
|
|
||||||
setHiddenSize( QSize( 0, fm.height() * 1.2 ) );
|
|
||||||
|
|
||||||
ui->queue->setProxyModel( new QueueProxyModel( ui->queue ) );
|
ui->queue->setProxyModel( new QueueProxyModel( ui->queue ) );
|
||||||
ui->queue->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
|
ui->queue->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
|
||||||
|
@@ -69,9 +69,6 @@ SourceTreeView::SourceTreeView( QWidget* parent )
|
|||||||
setContentsMargins( 0, 0, 0, 0 );
|
setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
|
||||||
QFont fnt;
|
QFont fnt;
|
||||||
fnt.setPointSize( TomahawkUtils::defaultFontSize() - 2 );
|
|
||||||
setFont( fnt );
|
|
||||||
|
|
||||||
QFontMetrics fm( fnt );
|
QFontMetrics fm( fnt );
|
||||||
// This is sort of the longest string in there. With translations
|
// 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
|
// we will never get it right so setting it to something reasonable for the average case
|
||||||
|
Reference in New Issue
Block a user