History

Allow explicit overlay alpha from scripts

Bradley Austin Davis committed 10 years ago

Commit 6ad10081 parent faa26249 files · +60 −5Browse files

Showing the changes to interface/src/scripting/DesktopScriptingInterface.cpp (1 of 9 files). Show all

Unified · Split

interface/src/scripting/DesktopScriptingInterface.cpp+6−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616
1717 #include "Application.h"
1818 #include "MainWindow.h"
19+#include <display-plugins/CompositorHelper.h>
1920
2021 int DesktopScriptingInterface::getWidth() {
2122 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();
@@ -25,3 +26,8 @@ int DesktopScriptingInterface::getHeight() { · 3 unmodified lines
2526 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();
2627 return size.height();
2728 }
29+
30+void DesktopScriptingInterface::setOverlayAlpha(float alpha) {
31+ qApp->getApplicationCompositor().setAlpha(alpha);
32+}
33+