From 7892f5516650d99ab8a01fdc5c538306e2a6836f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Jun 2013 20:49:11 +0300 Subject: improve shortcutcontainer. --- src/gui/widgets/shortcutcontainer.cpp | 2 +- src/gui/widgets/shortcutcontainer.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp index 5ebe67a4f..89b5c1c14 100644 --- a/src/gui/widgets/shortcutcontainer.cpp +++ b/src/gui/widgets/shortcutcontainer.cpp @@ -60,7 +60,7 @@ ShortcutContainer::~ShortcutContainer() void ShortcutContainer::widgetResized(const gcn::Event &event A_UNUSED) { - mGridWidth = getWidth() / mBoxWidth; + mGridWidth = mDimension.width / mBoxWidth; if (mGridWidth < 1) mGridWidth = 1; diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index 176c1837c..c714ab0ad 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -114,8 +114,10 @@ class ShortcutContainer : public gcn::Widget, unsigned mMaxItems; int mBoxWidth; int mBoxHeight; - int mCursorPosX, mCursorPosY; - int mGridWidth, mGridHeight; + int mCursorPosX; + int mCursorPosY; + int mGridWidth; + int mGridHeight; ImageCollection *mVertexes; bool mRedraw; }; -- cgit v1.2.3-70-g09d2