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

* ...and some more font fixes.

This commit is contained in:
Christian Muehlhaeuser
2012-09-02 01:28:01 +02:00
parent 6f1f38f22b
commit 2fc63675cd
4 changed files with 9 additions and 30 deletions

View File

@@ -54,7 +54,7 @@ AudioControls::AudioControls( QWidget* parent )
setAcceptDrops( true ); setAcceptDrops( true );
QFont font( ui->artistTrackLabel->font() ); QFont font( ui->artistTrackLabel->font() );
font.setPixelSize( 12 ); font.setPointSize( TomahawkUtils::defaultFontSize() );
ui->artistTrackLabel->setFont( font ); ui->artistTrackLabel->setFont( font );
ui->artistTrackLabel->setElideMode( Qt::ElideMiddle ); ui->artistTrackLabel->setElideMode( Qt::ElideMiddle );
@@ -67,7 +67,7 @@ AudioControls::AudioControls( QWidget* parent )
ui->timeLabel->setFont( font ); ui->timeLabel->setFont( font );
ui->timeLeftLabel->setFont( font ); ui->timeLeftLabel->setFont( font );
font.setPixelSize( 9 ); font.setPointSize( TomahawkUtils::defaultFontSize() - 2 );
ui->ownerLabel->setFont( font ); ui->ownerLabel->setFont( font );
ui->prevButton->setPixmap( RESPATH "images/back-rest.png" ); ui->prevButton->setPixmap( RESPATH "images/back-rest.png" );

View File

@@ -24,12 +24,12 @@
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include "GlobalActionManager.h" #include "GlobalActionManager.h"
#include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "Source.h" #include "Source.h"
#define CORNER_ROUNDNESS 8.0 #define CORNER_ROUNDNESS 8.0
#define FADING_DURATION 500 #define FADING_DURATION 500
#define FONT_SIZE 16
#define OPACITY 0.85 #define OPACITY 0.85
@@ -48,14 +48,7 @@ SocialWidget::SocialWidget( QWidget* parent )
m_timer.setSingleShot( true ); m_timer.setSingleShot( true );
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) ); connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) );
#ifdef Q_WS_MAC
QFont f( font() );
f.setPointSize( f.pointSize() - 2 );
setFont( f );
#endif
ui->charsLeftLabel->setForegroundRole( QPalette::BrightText ); ui->charsLeftLabel->setForegroundRole( QPalette::BrightText );
ui->buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Tweet" ) ); ui->buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Tweet" ) );
m_parent->installEventFilter( this ); m_parent->installEventFilter( this );
@@ -171,9 +164,8 @@ SocialWidget::paintEvent( QPaintEvent* event )
QTextOption to( Qt::AlignCenter ); QTextOption to( Qt::AlignCenter );
to.setWrapMode( QTextOption::WrapAtWordBoundaryOrAnywhere ); to.setWrapMode( QTextOption::WrapAtWordBoundaryOrAnywhere );
// shrink to fit if needed
QFont f( font() ); QFont f( font() );
f.setPointSize( FONT_SIZE ); f.setPointSize( TomahawkUtils::defaultFontSize() + 7 );
f.setBold( true ); f.setBold( true );
QRectF textRect = r.adjusted( 8, 8, -8, -8 ); QRectF textRect = r.adjusted( 8, 8, -8, -8 );

View File

@@ -23,11 +23,11 @@
#include <QAbstractScrollArea> #include <QAbstractScrollArea>
#include <QScrollBar> #include <QScrollBar>
#include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#define CORNER_ROUNDNESS 8.0 #define CORNER_ROUNDNESS 8.0
#define FADING_DURATION 500 #define FADING_DURATION 500
#define FONT_SIZE 12
#define OPACITY 0.70 #define OPACITY 0.70
@@ -43,12 +43,6 @@ OverlayButton::OverlayButton( QWidget* parent )
m_timer.setSingleShot( true ); m_timer.setSingleShot( true );
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) ); connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) );
#ifdef Q_WS_MAC
QFont f( font() );
f.setPointSize( f.pointSize() - 2 );
setFont( f );
#endif
} }
@@ -81,7 +75,7 @@ OverlayButton::setText( const QString& text )
m_text = text; m_text = text;
QFont f( font() ); QFont f( font() );
f.setPointSize( FONT_SIZE ); f.setPointSize( TomahawkUtils::defaultFontSize() + 3 );
f.setBold( true ); f.setBold( true );
QFontMetrics fm( f ); QFontMetrics fm( f );
@@ -151,9 +145,8 @@ OverlayButton::paintEvent( QPaintEvent* event )
QTextOption to( Qt::AlignCenter ); QTextOption to( Qt::AlignCenter );
to.setWrapMode( QTextOption::WrapAtWordBoundaryOrAnywhere ); to.setWrapMode( QTextOption::WrapAtWordBoundaryOrAnywhere );
// shrink to fit if needed
QFont f( font() ); QFont f( font() );
f.setPixelSize( FONT_SIZE ); f.setPointSize( TomahawkUtils::defaultFontSize() + 3 );
f.setBold( true ); f.setBold( true );
p.setFont( f ); p.setFont( f );

View File

@@ -23,11 +23,11 @@
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include "PlayableProxyModel.h" #include "PlayableProxyModel.h"
#include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#define CORNER_ROUNDNESS 8.0 #define CORNER_ROUNDNESS 8.0
#define FADING_DURATION 500 #define FADING_DURATION 500
#define FONT_SIZE 16
#define OPACITY 0.70 #define OPACITY 0.70
@@ -75,12 +75,6 @@ OverlayWidget::init()
m_timer.setSingleShot( true ); m_timer.setSingleShot( true );
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) ); connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) );
#ifdef Q_WS_MAC
QFont f( font() );
f.setPointSize( f.pointSize() - 2 );
setFont( f );
#endif
} }
@@ -229,7 +223,7 @@ OverlayWidget::paintEvent( QPaintEvent* event )
// shrink to fit if needed // shrink to fit if needed
QFont f( font() ); QFont f( font() );
f.setPointSize( FONT_SIZE ); f.setPointSize( TomahawkUtils::defaultFontSize() + 7 );
f.setBold( true ); f.setBold( true );
QRectF textRect = r.adjusted( 8, 8, -8, -8 ); QRectF textRect = r.adjusted( 8, 8, -8, -8 );