mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +02:00
fixed font sizes in the context page
This commit is contained in:
@@ -38,11 +38,12 @@ ContextProxyPage::paint( QPainter* painter, const QStyleOptionGraphicsItem* opti
|
||||
|
||||
QFont f( font() );
|
||||
f.setBold( true );
|
||||
f.setPixelSize( 14 );
|
||||
f.setPointSize( 8 );
|
||||
painter->setFont( f );
|
||||
painter->setPen( Qt::white );
|
||||
|
||||
QRect r( 1, 1, option->rect.width(), 19 );
|
||||
QFontMetrics fm( f );
|
||||
QRect r( 1, 1, option->rect.width(), fm.height() * 1.1 );
|
||||
QTextOption to( Qt::AlignCenter );
|
||||
painter->drawText( r, m_page->title(), to );
|
||||
|
||||
@@ -65,8 +66,12 @@ ContextProxyPage::setPage( Tomahawk::ContextPage* page )
|
||||
}
|
||||
#endif
|
||||
|
||||
QFont f( font() );
|
||||
f.setBold( true );
|
||||
f.setPointSize( 8 );
|
||||
QFontMetrics fm( f );
|
||||
QGraphicsLinearLayout* layout = new QGraphicsLinearLayout();
|
||||
layout->setContentsMargins( 4, 20, 4, 4 );
|
||||
layout->setContentsMargins( 4, fm.height() * 1.1, 4, 4 );
|
||||
layout->addItem( page->widget() );
|
||||
setLayout( layout );
|
||||
|
||||
|
@@ -43,7 +43,6 @@ using namespace Tomahawk;
|
||||
ContextWidget::ContextWidget( QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, ui( new Ui::ContextWidget )
|
||||
, m_minHeight( 22 )
|
||||
, m_currentView( 0 )
|
||||
, m_visible( false )
|
||||
{
|
||||
@@ -86,9 +85,15 @@ ContextWidget::ContextWidget( QWidget* parent )
|
||||
ui->toggleButton->setPalette( whitePal );
|
||||
|
||||
QFont boldFont = ui->toggleButton->font();
|
||||
boldFont.setPixelSize( 12 );
|
||||
//boldFont.setPixelSize( 12 );
|
||||
boldFont.setPointSize( 10 );
|
||||
boldFont.setBold( true );
|
||||
ui->toggleButton->setFont( boldFont );
|
||||
QFontMetrics fm( boldFont );
|
||||
|
||||
m_minHeight = fm.height() * 1.1;
|
||||
|
||||
ui->toggleButton->setMinimumHeight( fm.height() );
|
||||
|
||||
setAutoFillBackground( true );
|
||||
setFixedHeight( m_minHeight );
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>774</width>
|
||||
<height>72</height>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
Reference in New Issue
Block a user