summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-09 15:24:10 -0700
committerIra Rice <irarice@gmail.com>2009-01-09 15:24:10 -0700
commita4bb147cc8321a210b5fe6a6ce776679369d76e8 (patch)
tree3c5be8752639e04a1034b6ec9b1387c352f0a713 /src/gui
parentdbd70f58177e65266d1dff00f4ccf5bca7acbc04 (diff)
downloadmana-a4bb147cc8321a210b5fe6a6ce776679369d76e8.tar.gz
mana-a4bb147cc8321a210b5fe6a6ce776679369d76e8.tar.bz2
mana-a4bb147cc8321a210b5fe6a6ce776679369d76e8.tar.xz
mana-a4bb147cc8321a210b5fe6a6ce776679369d76e8.zip
Fixed the default size for shortcut windows, as well as added both of
the new shortcut windows to the reset shortcut window. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup.cpp4
-rw-r--r--src/gui/shortcutwindow.cpp6
-rw-r--r--src/gui/shortcutwindow.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 73023eba..bcffbae0 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -43,6 +43,8 @@ extern Window *minimap;
extern Window *skillDialog;
extern Window *statusWindow;
extern Window *itemShortcutWindow;
+extern Window *smileyShortcutWindow;
+extern Window *smileyWindow;
extern Window *tradeWindow;
Setup::Setup():
@@ -136,6 +138,8 @@ void Setup::action(const gcn::ActionEvent &event)
helpWindow->resetToDefaultSize();
skillDialog->resetToDefaultSize();
itemShortcutWindow->resetToDefaultSize();
+ smileyShortcutWindow->resetToDefaultSize();
+ smileyWindow->resetToDefaultSize();
tradeWindow->resetToDefaultSize();
}
}
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index d2aa2c2c..eb9efa84 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -25,14 +25,13 @@
static const int SCROLL_PADDING = 0;
-ShortcutWindow::ShortcutWindow(const char * title,ShortcutContainer *content)
+ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content)
{
setWindowName(title);
// no title presented, title bar is padding so window can be moved.
gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
setShowTitle(false);
setResizable(true);
- setDefaultSize(758, 174, 42, 426);
mItems = content;
@@ -42,6 +41,9 @@ 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,
+ (mItems->getBoxHeight() * mItems->getMaxItems()) + border);
+
mScrollArea = new ScrollArea(mItems);
mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING);
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index c9ba9d2e..b5a23c2c 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -40,7 +40,7 @@ class ShortcutWindow : public Window
/**
* Constructor.
*/
- ShortcutWindow(const char *title,ShortcutContainer *content);
+ ShortcutWindow(const char *title, ShortcutContainer *content);
/**
* Destructor.