]> git.lyx.org Git - features.git/commitdiff
Fix display of toolbar icons after r31255.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 13 Sep 2009 18:09:40 +0000 (18:09 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 13 Sep 2009 18:09:40 +0000 (18:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31387 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiToolbar.cpp

index 13dbd9ca80755880f0cfec31dbeb78de10d44765..6c1de5387e0c4381ca2fcd828b3990b41dda41c0 100644 (file)
@@ -175,7 +175,12 @@ MenuButton::MenuButton(GuiToolbar * bar, ToolbarItem const & item, bool const st
        setToolTip(label);
        setStatusTip(label);
        setText(label);
-       setIcon(QIcon(getPixmap("images/math/", toqstr(tbitem_.name_), "png")));
+       QString const name = toqstr(tbitem_.name_);
+       FileName fname = libFileSearch("images/math/", name, "png");
+       if (fname.exists())
+           setIcon(QIcon(getPixmap("images/math/", name, "png")));
+       else
+           setIcon(QIcon(getPixmap("images/", name, "png")));
        if (sticky)
                connect(this, SIGNAL(triggered(QAction *)),
                        this, SLOT(actionTriggered(QAction *)));