summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_visual.cpp14
-rw-r--r--src/gui/setup_visual.h1
2 files changed, 15 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);
+ }
+ }
+}
diff --git a/src/gui/setup_visual.h b/src/gui/setup_visual.h
index b8715f409..c76002c06 100644
--- a/src/gui/setup_visual.h
+++ b/src/gui/setup_visual.h
@@ -36,6 +36,7 @@ class Setup_Visual : public SetupTabScroll
void apply();
+ void action(const gcn::ActionEvent &event A_UNUSED);
};
#endif