diff --git a/Adafruit_GFX.cpp b/Adafruit_GFX.cpp index da5848fa..7a2f9d86 100644 --- a/Adafruit_GFX.cpp +++ b/Adafruit_GFX.cpp @@ -1695,11 +1695,8 @@ void Adafruit_GFX_Button::drawButton(bool inverted) { // System font is drawn from the upper left, but custom fonts are // drawn from the lower left. Adjust by the Y returned from getTextBounds(). _gfx->getTextBounds(_label, _x1, _y1, &x, &y, &w, &h); - _gfx->setCursor - ( - _x1 + (_w / 2) - (w / 2), - _y1 + (_h / 2) - (h / 2) + (_y1 - y) - ); + _gfx->setCursor(_x1 + (_w / 2) - (w / 2), + _y1 + (_h / 2) - (h / 2) + (_y1 - y)); _gfx->print(_label); }