diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-16 15:50:00 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-16 15:50:00 +0000 |
commit | 32badd4b6f843cb74fdc3238fe92119518c8c0ab (patch) | |
tree | ade2ace7f5ef62ae9fd14c6409d9c2df43a2348b /src/gui/window.cpp | |
parent | 65ccfccfc1e35a2e65638aea61c46e4e51bd874e (diff) | |
download | mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.tar.gz mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.tar.bz2 mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.tar.xz mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.zip |
A bunch of cosmetic changes.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 3b577116..492fe292 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -46,25 +46,12 @@ Image *Window::resizeGrip; class WindowConfigListener : public ConfigListener { - public: - /** - * Called when an config option changes. - */ - void optionChanged(const std::string &name) - { - if (name == "guialpha") - { - float guiAlpha = config.getValue("guialpha", 0.8); - - for (int i = 0; i < 9; i++) - { - if (Window::border.grid[i]->getAlpha() != guiAlpha) - { - Window::border.grid[i]->setAlpha(guiAlpha); - } - } - } - } + void optionChanged(const std::string &) + { + for_each(Window::border.grid, Window::border.grid + 9, + std::bind2nd(std::mem_fun(&Image::setAlpha), + config.getValue("guialpha", 0.8))); + } }; Window::Window(const std::string& caption, bool modal, Window *parent): |