summaryrefslogtreecommitdiff
path: root/src/gui/shortcutwindow.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-09 15:50:50 -0700
committerIra Rice <irarice@gmail.com>2009-01-09 15:50:50 -0700
commit5ac0e7d568ab0203d478d6b35d3e5d9308d3c9b7 (patch)
treecea9005667abc8e7989f58018d9d39af7a4777ac /src/gui/shortcutwindow.cpp
parenta4bb147cc8321a210b5fe6a6ce776679369d76e8 (diff)
downloadmana-5ac0e7d568ab0203d478d6b35d3e5d9308d3c9b7.tar.gz
mana-5ac0e7d568ab0203d478d6b35d3e5d9308d3c9b7.tar.bz2
mana-5ac0e7d568ab0203d478d6b35d3e5d9308d3c9b7.tar.xz
mana-5ac0e7d568ab0203d478d6b35d3e5d9308d3c9b7.zip
Changed reset defaults to be dependant upon the screen resolution for
the shortcut window. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/shortcutwindow.cpp')
-rw-r--r--src/gui/shortcutwindow.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index eb9efa84..d2b939f5 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -23,6 +23,8 @@
#include "shortcutwindow.h"
#include "scrollarea.h"
+#include "../configuration.h"
+
static const int SCROLL_PADDING = 0;
ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content)
@@ -41,7 +43,12 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content)
setMaxWidth(mItems->getBoxWidth() * mItems->getMaxItems() + border);
setMaxHeight(mItems->getBoxHeight() * mItems->getMaxItems() + border);
- setDefaultSize(758, 174, mItems->getBoxWidth() + border,
+ const int width = (int) config.getValue("screenwidth", 800);
+ const int height = (int) config.getValue("screenheight", 600);
+
+ setDefaultSize(width - mItems->getBoxWidth() - border,
+ height - (mItems->getBoxHeight() * mItems->getMaxItems()) -
+ border, mItems->getBoxWidth() + border,
(mItems->getBoxHeight() * mItems->getMaxItems()) + border);
mScrollArea = new ScrollArea(mItems);