Add configurable transparency

Now the opacity of the area outside the selection in the graphical
capture is configurable.
This commit is contained in:
lupoDharkael
2017-12-31 17:46:26 +01:00
parent 4770dd195e
commit 2932e5930d
13 changed files with 148 additions and 44 deletions

View File

@@ -158,6 +158,19 @@ void ConfigHandler::setStartupLaunch(const bool start) {
#endif
}
int ConfigHandler::contrastOpacityValue() {
int opacity = 190;
if (m_settings.contains("contrastOpacity")) {
opacity = m_settings.value("contrastOpacity").toInt();
opacity = qBound(0, opacity, 255);
}
return opacity;
}
void ConfigHandler::setContrastOpacity(const int transparency) {
m_settings.setValue("contrastOpacity", transparency);
}
bool ConfigHandler::initiatedIsSet() {
return m_settings.value("initiated").toBool();
}

View File

@@ -63,6 +63,10 @@ public:
bool startupLaunchValue();
void setStartupLaunch(const bool);
int contrastOpacityValue();
void setContrastOpacity(const int);
bool initiatedIsSet();
void setInitiated();
void setNotInitiated();