From 5ac0e7d568ab0203d478d6b35d3e5d9308d3c9b7 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Fri, 9 Jan 2009 15:50:50 -0700 Subject: Changed reset defaults to be dependant upon the screen resolution for the shortcut window. Signed-off-by: Ira Rice --- src/gui/shortcutwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2