This commit is contained in:
e2002
2025-08-25 16:45:25 +03:00
parent 1b644d7895
commit 3cc8450f23
7 changed files with 10 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
#define options_h
#pragma once
#define YOVERSION "0.9.670"
#define YOVERSION "0.9.676"
/*******************************************************
DO NOT EDIT THIS FILE.

View File

@@ -66,6 +66,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs";
/* MOVES */ /* { left, top, width } */
const MoveConfig clockMove PROGMEM = { 0, 176, -1 };
const MoveConfig weatherMove PROGMEM = { 8, 97, MAX_WIDTH };
const MoveConfig weatherMoveVU PROGMEM = { 70, 97, 250 };
const MoveConfig weatherMoveVU PROGMEM = { 70, 97, MAX_WIDTH-70+TFT_FRAMEWDT };
#endif

View File

@@ -67,6 +67,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs";
/* MOVES */ /* { left, top, width } */
const MoveConfig clockMove PROGMEM = { 0, 230, -1 };
const MoveConfig weatherMove PROGMEM = { 8, 120, MAX_WIDTH };
const MoveConfig weatherMoveVU PROGMEM = { 89, 120, 381 };
const MoveConfig weatherMoveVU PROGMEM = { 89, 120, MAX_WIDTH-89+TFT_FRAMEWDT };
#endif

View File

@@ -65,6 +65,6 @@ const char bitrateFmt[] PROGMEM = "%d";
/* MOVES */ /* { left, top, width (0 - auto, -1 - lock } */
const MoveConfig clockMove PROGMEM = { 14, 94, 0};
const MoveConfig weatherMove PROGMEM = {TFT_FRAMEWDT, 48, MAX_WIDTH};
const MoveConfig weatherMoveVU PROGMEM = { 34, 48, 122 };
const MoveConfig weatherMoveVU PROGMEM = { 34, 48, MAX_WIDTH-34+TFT_FRAMEWDT };
#endif

View File

@@ -69,6 +69,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs";
/* MOVES */ /* { left, top, width } */
const MoveConfig clockMove PROGMEM = { 8, 180, -1 };
const MoveConfig weatherMove PROGMEM = { 8, 97, MAX_WIDTH };
const MoveConfig weatherMoveVU PROGMEM = { 70, 97, 250 };
const MoveConfig weatherMoveVU PROGMEM = { 70, 97, MAX_WIDTH-70+TFT_FRAMEWDT };
#endif

View File

@@ -67,6 +67,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs";
/* MOVES */ /* { left, top, width } */
const MoveConfig clockMove PROGMEM = { 0, 176, -1 };
const MoveConfig weatherMove PROGMEM = { 8, 120, MAX_WIDTH };
const MoveConfig weatherMoveVU PROGMEM = { 89, 120, 381 };
const MoveConfig weatherMoveVU PROGMEM = { 89, 120, MAX_WIDTH-89+TFT_FRAMEWDT };
#endif

View File

@@ -167,14 +167,14 @@ void ScrollWidget::setText(const char* txt) {
#ifdef PSFBUFFER
_fb->fillRect(0, 0, _width, _textheight, _bgcolor);
_fb->setCursor(0, 0);
snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO
snprintf(_window, _width / _charWidth + 2, "%s", _text); //TODO
_fb->print(_window);
_fb->display();
#endif
} else {
dsp.fillRect(_config.left, _config.top, _width, _textheight, _bgcolor);
dsp.setCursor(_config.left, _config.top);
snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO
snprintf(_window, _width / _charWidth + 2, "%s", _text); //TODO
dsp.setClipping({_config.left, _config.top, _width, _textheight});
dsp.print(_window);
dsp.clearClipping();
@@ -235,10 +235,10 @@ void ScrollWidget::_draw() {
const char* _cursor = _text + _newx / _charWidth;
uint16_t hiddenChars = _cursor - _text;
if (hiddenChars < strlen(_text)) {
snprintf(_window, _width / _charWidth + 1, "%s%s%s", _cursor, _sep, _text);
snprintf(_window, _width / _charWidth + 2, "%s%s%s", _cursor, _sep, _text);
} else {
const char* _scursor = _sep + (_cursor - (_text + strlen(_text)));
snprintf(_window, _width / _charWidth + 1, "%s%s", _scursor, _text);
snprintf(_window, _width / _charWidth + 2, "%s%s", _scursor, _text);
}
if(_fb->ready()){
#ifdef PSFBUFFER