1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 21:27:58 +02:00

* More font fixes.

This commit is contained in:
Christian Muehlhaeuser
2012-09-01 18:39:05 +02:00
parent 48bf565ea9
commit bad07c6c63
5 changed files with 9 additions and 23 deletions

View File

@@ -22,6 +22,7 @@
#include "PlaylistInterface.h" #include "PlaylistInterface.h"
#include "utils/StyleHelper.h" #include "utils/StyleHelper.h"
#include "utils/TomahawkUtilsGui.h"
using namespace Tomahawk; using namespace Tomahawk;
@@ -38,7 +39,7 @@ ContextProxyPage::paint( QPainter* painter, const QStyleOptionGraphicsItem* opti
QFont f( font() ); QFont f( font() );
f.setBold( true ); f.setBold( true );
f.setPointSize( 8 ); f.setPointSize( TomahawkUtils::defaultFontSize() - 1 );
painter->setFont( f ); painter->setFont( f );
painter->setPen( Qt::white ); painter->setPen( Qt::white );

View File

@@ -44,31 +44,24 @@ InfoBar::InfoBar( QWidget* parent )
, ui( new Ui::InfoBar ) , ui( new Ui::InfoBar )
, m_queryLabel( 0 ) , m_queryLabel( 0 )
{ {
int requiredHeight = 0;
ui->setupUi( this ); ui->setupUi( this );
TomahawkUtils::unmarginLayout( layout() ); TomahawkUtils::unmarginLayout( layout() );
layout()->setContentsMargins( 8, 4, 8, 4 ); layout()->setContentsMargins( 8, 4, 8, 4 );
requiredHeight += 8; // Top + bottom margins
QFont boldFont = ui->captionLabel->font(); QFont boldFont = ui->captionLabel->font();
boldFont.setPointSize( 16 ); boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 5 );
boldFont.setBold( true ); boldFont.setBold( true );
ui->captionLabel->setFont( boldFont ); ui->captionLabel->setFont( boldFont );
ui->captionLabel->setElideMode( Qt::ElideRight ); ui->captionLabel->setElideMode( Qt::ElideRight );
QFontMetrics boldFontMetrics( boldFont ); QFontMetrics boldFontMetrics( boldFont );
requiredHeight += boldFontMetrics.height(); boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 1 );
boldFont.setPointSize( 10 );
boldFont.setBold( false ); boldFont.setBold( false );
ui->descriptionLabel->setFont( boldFont ); ui->descriptionLabel->setFont( boldFont );
boldFontMetrics = QFontMetrics( boldFont ); boldFontMetrics = QFontMetrics( boldFont );
requiredHeight += boldFontMetrics.height();
QFont regFont = ui->longDescriptionLabel->font(); QFont regFont = ui->longDescriptionLabel->font();
regFont.setPointSize( 9 ); regFont.setPointSize( TomahawkUtils::defaultFontSize() );
ui->longDescriptionLabel->setFont( regFont ); ui->longDescriptionLabel->setFont( regFont );
m_whitePal = ui->captionLabel->palette(); m_whitePal = ui->captionLabel->palette();
@@ -79,11 +72,7 @@ InfoBar::InfoBar( QWidget* parent )
ui->longDescriptionLabel->setPalette( m_whitePal ); ui->longDescriptionLabel->setPalette( m_whitePal );
ui->captionLabel->setMargin( 6 ); ui->captionLabel->setMargin( 6 );
requiredHeight += 2*6;
ui->descriptionLabel->setMargin( 6 ); ui->descriptionLabel->setMargin( 6 );
requiredHeight += 2*6;
ui->longDescriptionLabel->setMargin( 4 ); ui->longDescriptionLabel->setMargin( 4 );
ui->captionLabel->setText( QString() ); ui->captionLabel->setText( QString() );
@@ -108,9 +97,7 @@ InfoBar::InfoBar( QWidget* parent )
setAutoFillBackground( true ); setAutoFillBackground( true );
setMinimumHeight( requiredHeight ); setFixedHeight( 80 );
setMaximumHeight( requiredHeight );
createTile(); createTile();
connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) ); connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) );

View File

@@ -262,7 +262,6 @@ Connection::doSetup()
// Connections should always be in the same thread as the servent. // Connections should always be in the same thread as the servent.
qDebug() << "Fixing thead affinity..."; qDebug() << "Fixing thead affinity...";
moveToThread( m_servent->thread() ); moveToThread( m_servent->thread() );
qDebug() << Q_FUNC_INFO << thread();
} }
//stats timer calculates BW used by this connection //stats timer calculates BW used by this connection
@@ -471,7 +470,6 @@ Connection::sendMsg( msg_ptr msg )
void void
Connection::sendMsg_now( msg_ptr msg ) Connection::sendMsg_now( msg_ptr msg )
{ {
//qDebug() << Q_FUNC_INFO << thread() << QThread::currentThread();
Q_ASSERT( QThread::currentThread() == thread() ); Q_ASSERT( QThread::currentThread() == thread() );
// Q_ASSERT( this->isRunning() ); // Q_ASSERT( this->isRunning() );

View File

@@ -51,11 +51,11 @@ FlexibleHeader::FlexibleHeader( FlexibleView* parent )
ui->descLabel->setPalette( pal ); ui->descLabel->setPalette( pal );
QFont font = ui->captionLabel->font(); QFont font = ui->captionLabel->font();
font.setPointSize( 13 ); font.setPointSize( TomahawkUtils::defaultFontSize() + 4 );
font.setBold( true ); font.setBold( true );
ui->captionLabel->setFont( font ); ui->captionLabel->setFont( font );
font.setPointSize( 8 ); font.setPointSize( TomahawkUtils::defaultFontSize() );
ui->descLabel->setFont( font ); ui->descLabel->setFont( font );
ui->radioNormal->setFocusPolicy( Qt::NoFocus ); ui->radioNormal->setFocusPolicy( Qt::NoFocus );

View File

@@ -104,7 +104,7 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
QFont f = font(); QFont f = font();
f.setBold( true ); f.setBold( true );
f.setPointSize( 14 ); f.setPointSize( TomahawkUtils::defaultFontSize() + 5 );
ui->artistLabel->setFont( f ); ui->artistLabel->setFont( f );
QPalette p = ui->biography->palette(); QPalette p = ui->biography->palette();