mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 01:22:49 +02:00
Scale up artist bio font size with DpiScaler to make it always readable
This commit is contained in:
parent
9a741cd2db
commit
ce3647a4a6
src/libtomahawk
@ -53,11 +53,11 @@ public:
|
||||
static QMargins scaled( const QPaintDevice* pd, const QMargins& margins );
|
||||
static int scaledX( const QPaintDevice* pd, int x );
|
||||
static int scaledY( const QPaintDevice* pd, int y );
|
||||
inline static qreal ratioFromFontHeight();
|
||||
|
||||
private:
|
||||
inline static qreal ratioX( const QPaintDevice* pd );
|
||||
inline static qreal ratioY( const QPaintDevice* pd );
|
||||
inline static qreal ratioFromFontHeight();
|
||||
|
||||
qreal m_ratioX;
|
||||
qreal m_ratioY;
|
||||
|
@ -124,6 +124,7 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
||||
ui->biography->page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
|
||||
ui->biography->page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAsNeeded );
|
||||
ui->biography->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
|
||||
ui->biography->setTextSizeMultiplier( DpiScaler::ratioFromFontHeight() );
|
||||
ui->biography->installEventFilter( this );
|
||||
|
||||
TomahawkStyle::stylePageWidget( ui->biography );
|
||||
|
Loading…
x
Reference in New Issue
Block a user