From d956102647a5b53dab359290568c6caabd5f75e0 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sat, 9 Jul 2011 15:32:05 +0200 Subject: Made the button icon only shown when the icon file is valid. And falls back to the text based caption otherwise. --- src/gui/windowmenu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/windowmenu.cpp') diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index a200427f..2595c819 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -160,10 +160,9 @@ void WindowMenu::addButton(const std::string& text, int &x, int &h, const std::string& iconPath) { Button *btn = new Button("", text, this); - if (!iconPath.empty()) + if (!iconPath.empty() && btn->setButtonIcon(iconPath)) { btn->setButtonPopupText(gettext(text.c_str())); - btn->setButtonIcon(iconPath); } else { -- cgit v1.2.3-70-g09d2