Change the title for SideBarWidgets to be vertically centered related… (#6833)
* Change the title for SideBarWidgets to be vertically centered related to icon and with no underlining * Update src/gui/SideBarWidget.cpp Co-authored-by: saker <sakertooth@gmail.com> --------- Co-authored-by: saker <sakertooth@gmail.com>
This commit is contained in:
@@ -62,16 +62,16 @@ void SideBarWidget::paintEvent( QPaintEvent * )
|
||||
|
||||
QFont f = p.font();
|
||||
f.setBold( true );
|
||||
f.setUnderline( true );
|
||||
f.setUnderline(false);
|
||||
f.setPointSize( f.pointSize() + 2 );
|
||||
p.setFont( f );
|
||||
|
||||
p.setPen( palette().highlightedText().color() );
|
||||
|
||||
const int tx = m_icon.width()+4;
|
||||
const int tx = m_icon.width() + 8;
|
||||
|
||||
QFontMetrics metrics( f );
|
||||
const int ty = metrics.ascent();
|
||||
const int ty = (metrics.ascent() + m_icon.height()) / 2;
|
||||
p.drawText( tx, ty, m_title );
|
||||
|
||||
p.drawPixmap( 2, 2, m_icon.transformed( QTransform().rotate( -90 ) ) );
|
||||
|
||||
Reference in New Issue
Block a user