diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-07 15:21:33 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-07 15:21:33 -0700 |
commit | 472494898ee15e92f16ea5f5667c11b6f46b0057 (patch) | |
tree | eca084e8b006735e8220274b83f667d92d4ce3cf /src | |
parent | c42eba00701f28b3cf720d90c73d1cfc6c3815da (diff) | |
download | mana-client-472494898ee15e92f16ea5f5667c11b6f46b0057.tar.gz mana-client-472494898ee15e92f16ea5f5667c11b6f46b0057.tar.bz2 mana-client-472494898ee15e92f16ea5f5667c11b6f46b0057.tar.xz mana-client-472494898ee15e92f16ea5f5667c11b6f46b0057.zip |
While this commit isn't really needed, this cleans up the reported
instances number so that it accurately reflects the number of instances,
instead of always being +1. I wasn't intending on using that variable
that way, but in case anyone does in the future, it'll at least be
accurate.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/shortcutwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index dd8634f7..5d49a3c6 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -27,7 +27,7 @@ static const int SCROLL_PADDING = 0; -int ShortcutWindow::mInstances = 1; +int ShortcutWindow::mInstances = 0; ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) { @@ -39,6 +39,8 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mItems = content; + mInstances++; + const int border = SCROLL_PADDING * 2 + getPadding() * 2; setMinWidth(mItems->getBoxWidth() + border); setMinHeight(mItems->getBoxHeight() + border); @@ -59,8 +61,6 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mScrollArea->setOpaque(false); - mInstances++; - add(mScrollArea); loadWindowState(); |