This commit is contained in:
e2002
2022-06-22 11:58:37 +03:00
parent 630dce0c9a
commit 26f49101be
15 changed files with 1158 additions and 23 deletions

View File

@@ -258,6 +258,9 @@ void DspCore::printClock(struct tm timeinfo, bool dots, bool redraw){
sprintf(timeBuf, "%2d %s %d", timeinfo.tm_mday,mnths[timeinfo.tm_mon], timeinfo.tm_year+1900);
setTextSize(1);
uint16_t wdate, hdate;
getTextBounds(timeBuf, 0, 0, &x1, &y1, &wdate, &hdate);
fillRect(swidth - wdate - TFT_FRAMEWDT-20, cltop+10, wdate+20, hdate, TFT_BG);
rightText(utf8Rus(timeBuf,true), cltop+10, TFT_FG, TFT_BG, false, swidth>240?12:0);
drawFastVLine(clleft+wot+clsp/2+3, cltop-hot, hot+3, SILVER);
drawFastHLine(clleft+wot+clsp/2+3, cltop-hot+29, 42, SILVER);
@@ -293,11 +296,14 @@ void DspCore::drawVolumeBar(bool withNumber) {
uint16_t wv, hv;
int16_t x1, y1;
setTextColor(TFT_BG);
/*setTextColor(TFT_BG);
sprintf(volstr, "%d", oldVolume);
getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv);
setCursor((swidth - wv) / 2, (sheight-hv)/2 + hv);
print(volstr);
print(volstr);*/
sprintf(volstr, "%d", oldVolume);
getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv);
fillRect((swidth - wv) / 2 - 12, (sheight-hv)/2, wv+24, hv, TFT_BG);
setTextColor(TFT_FG);
sprintf(volstr, "%d", config.store.volume);