summaryrefslogtreecommitdiff
path: root/src/gui/widgets/resizegrip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/resizegrip.cpp')
-rw-r--r--src/gui/widgets/resizegrip.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/widgets/resizegrip.cpp b/src/gui/widgets/resizegrip.cpp
index 4b8bb4da..fa264e37 100644
--- a/src/gui/widgets/resizegrip.cpp
+++ b/src/gui/widgets/resizegrip.cpp
@@ -23,6 +23,7 @@
#include "resizegrip.h"
+#include "../../configuration.h"
#include "../../graphics.h"
#include "../../resources/image.h"
@@ -30,6 +31,7 @@
Image *ResizeGrip::gripImage = 0;
int ResizeGrip::mInstances = 0;
+float ResizeGrip::mAlpha = config.getValue("guialpha", 0.8);
ResizeGrip::ResizeGrip(std::string image)
{
@@ -38,6 +40,7 @@ ResizeGrip::ResizeGrip(std::string image)
// Load the grip image
ResourceManager *resman = ResourceManager::getInstance();
gripImage = resman->getImage(image);
+ gripImage->setAlpha(mAlpha);
}
mInstances++;
@@ -58,5 +61,11 @@ ResizeGrip::~ResizeGrip()
void ResizeGrip::draw(gcn::Graphics *graphics)
{
+ if (config.getValue("guialpha", 0.8) != mAlpha)
+ {
+ mAlpha = config.getValue("guialpha", 0.8);
+ gripImage->setAlpha(mAlpha);
+ }
+
static_cast<Graphics*>(graphics)->drawImage(gripImage, 0, 0);
}