summaryrefslogtreecommitdiff
path: root/src/gui/setup_visual.cpp
diff options
context:
space:
mode:
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);
+ }
+ }
+}