summaryrefslogtreecommitdiff
path: root/src/gui/setup_visual.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-20 03:08:42 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-20 03:08:42 +0300
commitf9abb45a7776fa158daef508f8287da267de002b (patch)
treeceba4b28986574e772078ab286c00f988e489739 /src/gui/setup_visual.cpp
parente2620fcbbe0ae5ac43565879f4b7243c367c84cf (diff)
downloadplus-f9abb45a7776fa158daef508f8287da267de002b.tar.gz
plus-f9abb45a7776fa158daef508f8287da267de002b.tar.bz2
plus-f9abb45a7776fa158daef508f8287da267de002b.tar.xz
plus-f9abb45a7776fa158daef508f8287da267de002b.zip
Allow chage gui opacity in settings on the fly.
Diffstat (limited to 'src/gui/setup_visual.cpp')
-rw-r--r--src/gui/setup_visual.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/setup_visual.cpp b/src/gui/setup_visual.cpp
index cc713effa..1cf35e4f2 100644
--- a/src/gui/setup_visual.cpp
+++ b/src/gui/setup_visual.cpp
@@ -31,6 +31,7 @@
#include "gui/widgets/layouthelper.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/setupitem.h"
+#include "gui/widgets/slider.h"
#include "resources/image.h"
@@ -72,3 +73,16 @@ void Setup_Visual::apply()
Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f);
Client::applyGrabMode();
}
+
+void Setup_Visual::action(const gcn::ActionEvent &event)
+{
+ if (event.getId() == "guialphaEvent")
+ {
+ Slider *slider = static_cast<Slider*>(event.getSource());
+ if (slider)
+ {
+ config.setValue("guialpha", slider->getValue());
+ Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f);
+ }
+ }
+}