]> git.lyx.org Git - features.git/commitdiff
* Leave page size at it is to avoid strange layout effects on Mac
authorStefan Schimanski <sts@lyx.org>
Wed, 5 Mar 2008 12:01:27 +0000 (12:01 +0000)
committerStefan Schimanski <sts@lyx.org>
Wed, 5 Mar 2008 12:01:27 +0000 (12:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23473 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiToolbar.cpp

index 642773edb8c12c5751b8a6bdba76dd65a51c7da1..90227345779f378a7029caa3c9d11b0efec1e70d 100644 (file)
@@ -255,15 +255,16 @@ public:
                // Draw using the menu item style (this is how QComboBox does it).
                // But for the rich text drawing below we will call it with an
                // empty string, and later then draw over it the real string.
+               painter->save();
                QStyleOptionMenuItem opt = getStyleOption(option, index);
                QString text = underlineFilter(opt.text);
                opt.text = QString();
                painter->eraseRect(option.rect);
                combo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, combo);
-               
+               painter->restore();
+
                // Draw the rich text.
                painter->save();
-               
                QColor col = opt.palette.text().color();
                if (opt.state & QStyle::State_Selected)
                        col = opt.palette.highlightedText().color();
@@ -273,8 +274,7 @@ public:
                QTextDocument doc;
                doc.setDefaultFont(opt.font);
                doc.setHtml(text);
-               doc.setPageSize(QSize(opt.rect.width() - 20, opt.rect.height()));
-               painter->translate(opt.rect.x() + 20, opt.rect.y() - opt.rect.height());
+               painter->translate(opt.rect.x() + 20, opt.rect.y());
                doc.documentLayout()->draw(painter, context);
                painter->restore();
        }
@@ -358,7 +358,7 @@ public:
        void setCharFilter(QString const & f)
        {
                setFilterRegExp(charFilterRegExp(f));
-               reset();
+               dataChanged(index(0, 0), index(rowCount() - 1, 1));
        }
 
 private: