QFontMetrics fm(font);
int w = fm.width(category);
int x = opt.rect.x() + (opt.rect.width() - w) / 2;
- int y = opt.rect.y() + 1.5 * fm.ascent();
+ int y = opt.rect.y() + 3 * fm.ascent() / 2;
int left = x;
int right = x + w;
painter->drawText(x, y, category);
void CategorizedCombo::setIconSize(QSize size)
{
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
bool small = size.height() < 20;
setAttribute(Qt::WA_MacSmallSize, small);
setAttribute(Qt::WA_MacNormalSize, !small);