]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/CategorizedCombo.cpp
Generalize starred cite commands
[lyx.git] / src / frontends / qt4 / CategorizedCombo.cpp
index 1fd7f35debc155285f0a6853917d3c9987a336a1..8e4fc64f4596f07bad7d6c9f17118c9febbf2126 100644 (file)
@@ -245,7 +245,7 @@ void CCItemDelegate::drawCategoryHeader(QPainter * painter, QStyleOptionViewItem
        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);
@@ -348,7 +348,6 @@ CategorizedCombo::CategorizedCombo(QWidget * parent)
        : QComboBox(parent), d(new Private(this))
 {
        setSizeAdjustPolicy(QComboBox::AdjustToContents);
-       setFocusPolicy(Qt::ClickFocus);
        setMinimumWidth(sizeHint().width());
        setMaxVisibleItems(100);
 
@@ -455,7 +454,7 @@ bool CategorizedCombo::eventFilter(QObject * o, QEvent * e)
 
 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);