logic: code view asset fix

Fixed asset paths for code view
This commit is contained in:
Manuel Dobusch
2016-02-09 14:05:25 +01:00
parent e13eaa85da
commit 082b94ac8d
3 changed files with 15 additions and 186 deletions
+12
View File
@@ -102,6 +102,18 @@ namespace utility
else if (val == "gui_path")
{
val = ResourcePaths::getGuiPath();
size_t index = 0;
while (true)
{
index = val.find("\\", index);
if (index == std::string::npos)
{
break;
}
val.replace(index, 1, "/");
index += 3;
}
}
else
{
+3 -1
View File
@@ -218,5 +218,7 @@ void QtCodeView::setStyleSheet() const
{
utility::setWidgetBackgroundColor(m_widget, ColorScheme::getInstance()->getColor("code/background"));
m_widget->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath() + "code_view/code_view.css").c_str());
std::string styleSheet = utility::getStyleSheet(ResourcePaths::getGuiPath() + "code_view/code_view.css");
m_widget->setStyleSheet(styleSheet.c_str());
}