Make text color themable as well and extend light theme
This commit is contained in:
parent
f5d2b2ac1c
commit
26a67310bb
|
@ -70,6 +70,7 @@ void ColorTheme::load(BuiltInColorTheme builtInColorTheme)
|
||||||
playingZoneBg = CColor(0.75f, 0.75f, 1.0f);
|
playingZoneBg = CColor(0.75f, 0.75f, 1.0f);
|
||||||
playingZoneMiddle = CColor(0.0f, 0.0f, 0.4f);
|
playingZoneMiddle = CColor(0.0f, 0.0f, 0.4f);
|
||||||
playingZoneBorder = CColor(0.0f, 0.0f, 0.8f);
|
playingZoneBorder = CColor(0.0f, 0.0f, 0.8f);
|
||||||
|
textColor = CColor(0.0, 0.0, 0.0); // black
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*this = ColorTheme();
|
*this = ColorTheme();
|
||||||
|
|
|
@ -104,6 +104,7 @@ struct ColorTheme
|
||||||
CColor playingZoneBg = CColor(0.0f, 0.0f, 0.3f);
|
CColor playingZoneBg = CColor(0.0f, 0.0f, 0.3f);
|
||||||
CColor playingZoneMiddle = CColor(0.0f, 0.0f, 0.8f);
|
CColor playingZoneMiddle = CColor(0.0f, 0.0f, 0.8f);
|
||||||
CColor playingZoneBorder = CColor(0.0f, 0.0f, 0.6f);
|
CColor playingZoneBorder = CColor(0.0f, 0.0f, 0.6f);
|
||||||
|
CColor textColor = CColor(1.0f, 1.0f, 1.0f);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -210,15 +210,16 @@ void CGLView::drawAccurracyBar()
|
||||||
|
|
||||||
m_rating->calculateAccuracy();
|
m_rating->calculateAccuracy();
|
||||||
|
|
||||||
|
const auto &colorTheme = Cfg::colorTheme();
|
||||||
accuracy = m_rating->getAccuracyValue();
|
accuracy = m_rating->getAccuracyValue();
|
||||||
color = m_rating->getAccuracyColor();
|
color = m_rating->getAccuracyColor();
|
||||||
CDraw::drColor (color);
|
CDraw::drColor (color);
|
||||||
glRectf(x, y - lineWidth, x + width * accuracy, y + lineWidth);
|
glRectf(x, y - lineWidth, x + width * accuracy, y + lineWidth);
|
||||||
CDraw::drColor (Cfg::colorTheme().backgroundColor);
|
CDraw::drColor (colorTheme.backgroundColor);
|
||||||
glRectf(x + width * accuracy, y - lineWidth, x + width, y + lineWidth);
|
glRectf(x + width * accuracy, y - lineWidth, x + width, y + lineWidth);
|
||||||
|
|
||||||
glLineWidth (1);
|
glLineWidth (1);
|
||||||
CDraw::drColor (CColor(1.0, 1.0, 1.0));
|
CDraw::drColor(colorTheme.textColor);
|
||||||
glBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
glVertex2f (x, y + lineWidth);
|
glVertex2f (x, y + lineWidth);
|
||||||
glVertex2f (x+ width, y + lineWidth);
|
glVertex2f (x+ width, y + lineWidth);
|
||||||
|
@ -247,7 +248,8 @@ void CGLView::drawDisplayText()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
glColor3f(1.0f,1.0f,1.0f);
|
const auto &colorTheme = Cfg::colorTheme();
|
||||||
|
CDraw::drColor(colorTheme.textColor);
|
||||||
|
|
||||||
if (m_song->getPlayMode() != PB_PLAY_MODE_listen) {
|
if (m_song->getPlayMode() != PB_PLAY_MODE_listen) {
|
||||||
if (accuracyBarStart == 0) {
|
if (accuracyBarStart == 0) {
|
||||||
|
@ -283,10 +285,7 @@ void CGLView::drawBarNumber()
|
||||||
const auto y = static_cast<float>(Cfg::getAppHeight() - m_titleHeight - 34);
|
const auto y = static_cast<float>(Cfg::getAppHeight() - m_titleHeight - 34);
|
||||||
const auto x = static_cast<float>(TEXT_LEFT_MARGIN);
|
const auto x = static_cast<float>(TEXT_LEFT_MARGIN);
|
||||||
|
|
||||||
//CDraw::drColor (Cfg::colorTheme().backgroundColor);
|
CDraw::drColor (Cfg::colorTheme().textColor);
|
||||||
//CDraw::drColor (Cfg::colorTheme().noteColorDim);
|
|
||||||
//glRectf(x+30+10, y-2, x + 80, y + 16);
|
|
||||||
glColor3f(1.0f,1.0f,1.0f);
|
|
||||||
renderText(x, y, 0, tr("Bar:") + " " + QString::number(m_song->getBarNumber()), m_timeRatingFont);
|
renderText(x, y, 0, tr("Bar:") + " " + QString::number(m_song->getBarNumber()), m_timeRatingFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user