Another fix to ensure that Qt TAS piano roll frame number width is at least 9 chars wide.
This commit is contained in:
parent
020e1e208a
commit
c890f6c1bb
|
@ -4294,6 +4294,7 @@ void QPianoRoll::setFont( QFont &newFont )
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void QPianoRoll::calcFontData(void)
|
void QPianoRoll::calcFontData(void)
|
||||||
{
|
{
|
||||||
|
QRect rect;
|
||||||
QWidget::setFont(font);
|
QWidget::setFont(font);
|
||||||
QFontMetrics metrics(font);
|
QFontMetrics metrics(font);
|
||||||
#if QT_VERSION > QT_VERSION_CHECK(5, 11, 0)
|
#if QT_VERSION > QT_VERSION_CHECK(5, 11, 0)
|
||||||
|
@ -4316,6 +4317,14 @@ void QPianoRoll::calcFontData(void)
|
||||||
pxWidthBtnCol = 3 * pxCharWidth;
|
pxWidthBtnCol = 3 * pxCharWidth;
|
||||||
pxWidthCtlCol = 8 * pxWidthBtnCol;
|
pxWidthCtlCol = 8 * pxWidthBtnCol;
|
||||||
|
|
||||||
|
rect = metrics.boundingRect( tr("000000000") );
|
||||||
|
|
||||||
|
//printf("FrameWidth: %i %i\n", pxWidthFrameCol, rect.width() );
|
||||||
|
if ( pxWidthFrameCol < rect.width() )
|
||||||
|
{
|
||||||
|
pxWidthFrameCol = rect.width();
|
||||||
|
}
|
||||||
|
|
||||||
pxFrameColX = pxWidthCol1;
|
pxFrameColX = pxWidthCol1;
|
||||||
|
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++)
|
||||||
|
|
Loading…
Reference in New Issue