]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/CategorizedCombo.cpp
Change a couple instances of QFontMetrics::width()
[lyx.git] / src / frontends / qt / CategorizedCombo.cpp
index 4acae5bc3452324dc48ef233024c851f25b39dbf..319bcb0e9c1f522898048fdd73db8f38a9384e01 100644 (file)
@@ -244,7 +244,7 @@ void CCItemDelegate::drawCategoryHeader(QPainter * painter, QStyleOptionViewItem
 
        // draw the centered text
        QFontMetrics fm(font);
-       int w = fm.width(category);
+       int w = fm.boundingRect(category).width();
        int x = opt.rect.x() + (opt.rect.width() - w) / 2;
        int y = opt.rect.y() + 3 * fm.ascent() / 2;
        int left = x;