Commit 9dcbf2eccb2aaad977211539f6c101bb8418ea18
make the current applet bigger if the system font size is bigger, otherwise the layout stops working
BUG: 227792
| |   |
| 147 | 147 | connect( dataEngine( "amarok-current" ), SIGNAL( sourceAdded( const QString& ) ), this, SLOT( connectSource( const QString& ) ) ); |
| 148 | 148 | connect( The::paletteHandler(), SIGNAL( newPalette( const QPalette& ) ), SLOT( paletteChanged( const QPalette & ) ) ); |
| 149 | 149 | |
| // completely arbitrary yet necessary to kick start the layout before the user acts and resizes manually |
| resize( 500, 180 ); |
| // figure out the size we want to be, in order to be able to squeeze in all that we want |
| // depends on the current font size, basically |
| // height should be increased for larger point sizes. here, the layout works correctly with size 8, which has the fontMetrics height of 13 |
| // a size too big, like font size 12, has a fontMetrics height of 19. So we add some height if it's too big |
| int additional = ( QApplication::fontMetrics().height()-13 ) * 2; |
| resize( 500, 180 + additional ); |
| |
| 152 | 157 | |
| 153 | 158 | // hide the items while we startup. as soon as the query is done, they'll be shown. |
| 154 | 159 | foreach ( QGraphicsItem * childItem, QGraphicsItem::children() ) |