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
16 16
17#include "Application.h"17#include "Application.h"
18#include "MainWindow.h"18#include "MainWindow.h"
19#include <display-plugins/CompositorHelper.h>
19 20
20int DesktopScriptingInterface::getWidth() {21int DesktopScriptingInterface::getWidth() {
21 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();22 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();
@@ -25,3 +26,8 @@ int DesktopScriptingInterface::getHeight() { · 3 unmodified lines
25 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();26 QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize();
26 return size.height();27 return size.height();
27}28}
29
30void DesktopScriptingInterface::setOverlayAlpha(float alpha) {
31 qApp->getApplicationCompositor().setAlpha(alpha);
32}
33