From 6da3d442683d1865f703dea63093052d5ba8f3d1 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Wed, 5 Mar 2008 12:01:27 +0000 Subject: [PATCH] * Leave page size at it is to avoid strange layout effects on Mac git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23473 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiToolbar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index 642773edb8..9022734577 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -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: -- 2.39.2