Skip to content
Snippets Groups Projects
Commit 4fa195d8 authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

Merge branch 'features-3051' into 'develop'

Features 3051

See merge request !6
parents 3890f182 091e0cf9
No related branches found
No related tags found
3 merge requests!17Develop old,!11Feature 3131,!6Features 3051
......@@ -24,4 +24,11 @@ namespace Utils
}
return (result.size() == 4) ? QColor(result.at(0), result.at(1), result.at(2), result.at(3)) : QColor();
}
int toIntValue(const QString &a_text)
{
QRegExp regString("(\\d+)");
regString.indexIn(a_text);
return regString.cap(0).toInt();
}
}
......@@ -6,6 +6,9 @@
namespace Utils
{
QColor toColor(const QString &strRGBA);
///The function returns the first integer in the string.
/// 100%=>100 100px=>100 100**=>100 100=>100
int toIntValue(const QString &a_text);
};
#endif // UTILS_H
......@@ -28,11 +28,11 @@ void StyledDropShadowEffect::updateStyle()
else
this->setColor(Utils::toColor(colorStr));
int blur = AppStyleSheetHandler::getValueFromStylesheet(stylesheet, "blur").toInt();
int blur = Utils::toIntValue(AppStyleSheetHandler::getValueFromStylesheet(stylesheet, "blur"));
this->setBlurRadius(blur);
//Offset:
int x = AppStyleSheetHandler::getValueFromStylesheet(stylesheet, "x").toInt();
int y = AppStyleSheetHandler::getValueFromStylesheet(stylesheet, "y").toInt();
int x = Utils::toIntValue(AppStyleSheetHandler::getValueFromStylesheet(stylesheet, "x"));
int y = Utils::toIntValue(AppStyleSheetHandler::getValueFromStylesheet(stylesheet, "y"));
this->setOffset(x, y);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment