From c79984ad84f5f472b85e65680b86d7df9e878fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 16 Aug 2024 18:59:19 +0200 Subject: [PATCH] Use status window pad settings to calculate width Reported in #171 --- src/StatusWindow.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/StatusWindow.cc b/src/StatusWindow.cc index 329684e7..5d126a91 100644 --- a/src/StatusWindow.cc +++ b/src/StatusWindow.cc @@ -72,7 +72,9 @@ StatusWindow::draw(const std::string &text, bool do_center, Geometry *gm) Theme::TextDialogData *sd = _theme->getStatusData(); PFont *font = sd->getFont(); - width = font->getWidth(text) + 10; + width = font->getWidth(text) + + sd->getPad(PAD_LEFT) + + sd->getPad(PAD_RIGHT); width = width - (width % 10); height = font->getHeight() + sd->getPad(PAD_UP)