summaryrefslogtreecommitdiff
path: root/src/gui/shortcutwindow.cpp
diff options
context:
space:
mode:
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);