mirror of https://github.com/arendst/Tasmota.git
Merge pull request #14011 from jeroenvermeulen/fix_touch_buttons_without_ufilesys
Fix for #14006: can't USE_TOUCH_BUTTONS without USE_UFILESYS
This commit is contained in:
commit
63d8d5ff2e
|
@ -1610,10 +1610,12 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
|
||||||
text = _fillcolor;
|
text = _fillcolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined USE_UFILESYS
|
||||||
if (_label[0]=='/') {
|
if (_label[0]=='/') {
|
||||||
draw_picture(_label, _x1, _y1, _w, _h, outline, inverted);
|
draw_picture(_label, _x1, _y1, _w, _h, outline, inverted);
|
||||||
_gfx->drawRect(_x1, _y1, _w, _h, text);
|
_gfx->drawRect(_x1, _y1, _w, _h, text);
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
uint8_t r = min(_w, _h) / 4; // Corner radius
|
uint8_t r = min(_w, _h) / 4; // Corner radius
|
||||||
_gfx->fillRoundRect(_x1, _y1, _w, _h, r, fill);
|
_gfx->fillRoundRect(_x1, _y1, _w, _h, r, fill);
|
||||||
_gfx->drawRoundRect(_x1, _y1, _w, _h, r, outline);
|
_gfx->drawRoundRect(_x1, _y1, _w, _h, r, outline);
|
||||||
|
@ -1622,7 +1624,9 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
|
||||||
_gfx->setTextColor(text);
|
_gfx->setTextColor(text);
|
||||||
_gfx->setTextSize(_textsize_x, _textsize_y);
|
_gfx->setTextSize(_textsize_x, _textsize_y);
|
||||||
_gfx->print(_label);
|
_gfx->print(_label);
|
||||||
|
#if defined USE_UFILESYS
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue