diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-19 23:04:11 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-19 23:04:11 +0000 |
commit | 30b8b4ecb92bb208c25a970d767e41ca102b16f1 (patch) | |
tree | d800bd7ab320d133a32b8ac7f63cb35d3b0274aa /src/gui | |
parent | 041f934a4276f21bf13e21fbcb26f638ec73090a (diff) | |
download | mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.tar.gz mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.tar.bz2 mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.tar.xz mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.zip |
Committed new graphics for button, checkbox and radio button by romulo. Also
added a bit of padding to the windows.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/window.cpp | 9 | ||||
-rw-r--r-- | src/gui/window.h | 15 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 310da823..83a0b283 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -35,7 +35,8 @@ Window::Window(const std::string& text, bool modal, Window *parent): snapSize(8), mouseDown(false), modal(modal), - titlebarHeight(20) + titlebarHeight(20), + padding(3) { log("Window::Window(\"%s\")", caption.c_str()); @@ -68,7 +69,7 @@ Window::Window(const std::string& text, bool modal, Window *parent): // Add chrome chrome = new gcn::Container(); chrome->setOpaque(false); - chrome->setY(titlebarHeight); + chrome->setPosition(padding, titlebarHeight + padding); gcn::Container::add(chrome); // Add this window to the window container @@ -145,13 +146,13 @@ void Window::setDimension(const gcn::Rectangle &dimension) void Window::setWidth(int width) { - gcn::Container::setWidth(width); + gcn::Container::setWidth(width + 2 * padding); chrome->setWidth(width); } void Window::setHeight(int height) { - gcn::Container::setHeight(height + titlebarHeight); + gcn::Container::setHeight(height + titlebarHeight + 2 * padding); chrome->setHeight(height); } diff --git a/src/gui/window.h b/src/gui/window.h index 3657eb1d..25403851 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -48,13 +48,14 @@ class Window : public gcn::Container, public gcn::MouseListener bool modal; /**< Window is modal */ gcn::Color titlebarColor; /**< Title bar color */ int titlebarHeight; /**< Height of title bar */ - - Image *dBackground; /**< Left side of title bar */ - Image *dBorders; /**< Middle of title bar */ - Image *dUpperBorder; /**< Upper border */ - Image *dLowerBorder; /**< Lower Border */ - Image *dLeftBorder; /**< Left Border */ - Image *dRightBorder; /**< Right Border */ + int padding; /**< Space between contents and border */ + + Image *dBackground; /**< Left side of title bar */ + Image *dBorders; /**< Middle of title bar */ + Image *dUpperBorder; /**< Upper border */ + Image *dLowerBorder; /**< Lower Border */ + Image *dLeftBorder; /**< Left Border */ + Image *dRightBorder; /**< Right Border */ /** The window container windows add themselves to. */ static WindowContainer* windowContainer; |