diff options
author | Tim E. Real <termtech@rogers.com> | 2010-12-29 10:51:49 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-12-29 10:51:49 +0000 |
commit | 62229671bfb963f2c323f95c729bdd59505728d1 (patch) | |
tree | c4f8e983636cb09513da32f7c1dbf12704ee22b9 /muse2/muse | |
parent | 607657d0aef36bc4f901207428620a881e5a4232 (diff) |
Fixed Bigtime display when using a style sheet for MusE.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/appearance.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/widgets/appearancebase.ui | 2 | ||||
-rw-r--r-- | muse2/muse/widgets/bigtime.cpp | 27 |
3 files changed, 19 insertions, 12 deletions
diff --git a/muse2/muse/appearance.cpp b/muse2/muse/appearance.cpp index db983cae..287001bd 100644 --- a/muse2/muse/appearance.cpp +++ b/muse2/muse/appearance.cpp @@ -108,7 +108,7 @@ Appearance::Appearance(Arranger* a, QWidget* parent) fontName6->setToolTip(tr("Mixer label font. Auto-font-sizing up to chosen font size.\nWord-breaking but only with spaces.")); fontSize6->setToolTip(tr("Maximum mixer label auto-font-sizing font size.")); - globalAlphaSlider->setToolTip(tr("Global opaqueness (inverse of transparency).")); + globalAlphaSlider->setToolTip(tr("Global opacity (opposite of transparency).")); // ARRANGER diff --git a/muse2/muse/widgets/appearancebase.ui b/muse2/muse/widgets/appearancebase.ui index 0a23b73c..67f1ea7c 100644 --- a/muse2/muse/widgets/appearancebase.ui +++ b/muse2/muse/widgets/appearancebase.ui @@ -734,7 +734,7 @@ </sizepolicy> </property> <property name="text"> - <string>Global opaqueness</string> + <string>Global opacity</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> diff --git a/muse2/muse/widgets/bigtime.cpp b/muse2/muse/widgets/bigtime.cpp index 6e49ee62..ba9defa9 100644 --- a/muse2/muse/widgets/bigtime.cpp +++ b/muse2/muse/widgets/bigtime.cpp @@ -66,12 +66,14 @@ BigTime::BigTime(QWidget* parent) oldAbsTick = oldAbsFrame = -1; setString(MAXINT); + dwin->setStyleSheet("font-size:10px; font-family:'Courier'; "); // Tim p4.0.8 + configChanged(); - QFont f(QString("Courier")); - f.setPixelSize(10); + //QFont f(QString("Courier")); + //f.setPixelSize(10); + //dwin->setFont(f); - dwin->setFont(f); setWindowTitle(tr("MusE: Bigtime")); } @@ -315,21 +317,26 @@ void BigTime::resizeEvent(QResizeEvent *ev) //int tw = fm.width(QString("00:00:00:00")); int tw = fm.width(QString("000:00:00:00")); - int nfs = ((ev->size().width() - hspace*2)*fs) / tw; + fs = ((ev->size().width() - hspace*2)*fs) / tw; // set min/max - if (nfs < 10) - nfs = 10; - else if (nfs > 256) - nfs = 256; + if (fs < 10) + fs = 10; + else if (fs > 256) + fs = 256; //if(debugMsg) // printf("resize BigTime: Font name:%s CurSize:%d NewSize:%d, NewWidth:%d\n", // f.family().toLatin1().constData(), fs, nfs, ev->size().width()); - f.setPixelSize(nfs); + //f.setPixelSize(fs); - dwin->setFont(f); + //dwin->setFont(f); + QString fstr = QString("font-size:%1px; font-family:'Courier'; ").arg(fs); // Tim p4.0.8 + dwin->setStyleSheet(fstr); + setBgColor(config.bigTimeBackgroundColor); + setFgColor(config.bigTimeForegroundColor); + int digitWidth = dwin->fontMetrics().width(QString("0")); int vspace = (ev->size().height() - (fs*2)) / 3; int tickY = vspace; |