summaryrefslogtreecommitdiff
path: root/src/gui/shortcutcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/shortcutcontainer.cpp')
-rw-r--r--src/gui/shortcutcontainer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/shortcutcontainer.cpp b/src/gui/shortcutcontainer.cpp
index 32d7c6af..88d9bb22 100644
--- a/src/gui/shortcutcontainer.cpp
+++ b/src/gui/shortcutcontainer.cpp
@@ -43,7 +43,8 @@ ShortcutContainer::ShortcutContainer():
void ShortcutContainer::widgetResized(const gcn::Event &event)
{
mGridWidth = getWidth() / mBoxWidth;
- if (mGridWidth < 1) {
+ if (mGridWidth < 1)
+ {
mGridWidth = 1;
}
@@ -51,7 +52,8 @@ void ShortcutContainer::widgetResized(const gcn::Event &event)
(mMaxItems % mGridWidth > 0 ? 1 : 0)) * mBoxHeight);
mGridHeight = getHeight() / mBoxHeight;
- if (mGridHeight < 1) {
+ if (mGridHeight < 1)
+ {
mGridHeight = 1;
}
}
@@ -61,7 +63,8 @@ ShortcutContainer::getIndexFromGrid(int pointX, int pointY) const
{
const gcn::Rectangle tRect = gcn::Rectangle(
0, 0, mGridWidth * mBoxWidth, mGridHeight * mBoxHeight);
- if (!tRect.isPointInRect(pointX, pointY)) {
+ if (!tRect.isPointInRect(pointX, pointY))
+ {
return -1;
}
const int index = ((pointY / mBoxHeight) * mGridWidth) +