summaryrefslogtreecommitdiff
path: root/src/FbTk/MenuItem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/MenuItem.cc')
-rw-r--r--src/FbTk/MenuItem.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc
index be8555b..898bf99 100644
--- a/src/FbTk/MenuItem.cc
+++ b/src/FbTk/MenuItem.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: MenuItem.cc,v 1.4 2004/07/05 09:40:08 fluxgen Exp $ 22// $Id: MenuItem.cc,v 1.5 2004/08/03 21:31:31 fluxgen Exp $
23 23
24#include "MenuItem.hh" 24#include "MenuItem.hh"
25#include "Command.hh" 25#include "Command.hh"
@@ -28,6 +28,7 @@
28#include "PixmapWithMask.hh" 28#include "PixmapWithMask.hh"
29#include "Image.hh" 29#include "Image.hh"
30#include "App.hh" 30#include "App.hh"
31#include "StringUtil.hh"
31 32
32namespace FbTk { 33namespace FbTk {
33 34
@@ -230,8 +231,9 @@ void MenuItem::setIcon(const std::string &filename, int screen_num) {
230 if (m_icon.get() == 0) 231 if (m_icon.get() == 0)
231 m_icon.reset(new Icon); 232 m_icon.reset(new Icon);
232 233
233 m_icon->filename = filename; 234 m_icon->filename = FbTk::StringUtil::expandFilename(filename);
234 m_icon->pixmap.reset(Image::load(filename.c_str(), screen_num)); 235 m_icon->pixmap.reset(Image::load(m_icon->filename.c_str(),
236 screen_num));
235} 237}
236 238
237unsigned int MenuItem::height(const MenuTheme &theme) const { 239unsigned int MenuItem::height(const MenuTheme &theme) const {