Merge pull request #77 from Jovvik/main

Fixed bar module width
This commit is contained in:
vaxerski 2022-05-25 11:16:28 +02:00 committed by GitHub
commit 3e3d943c44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -420,7 +420,7 @@ int CStatusBar::getTextWidth(std::string text, std::string font, double size) {
cairo_text_extents_t textextents; cairo_text_extents_t textextents;
cairo_text_extents(m_pCairo, text.c_str(), &textextents); cairo_text_extents(m_pCairo, text.c_str(), &textextents);
return textextents.width + 1 /* pad */; return textextents.x_advance;
} }
void CStatusBar::drawText(Vector2D pos, std::string text, uint32_t color, std::string font, double size) { void CStatusBar::drawText(Vector2D pos, std::string text, uint32_t color, std::string font, double size) {