logic: code view asset fix
Fixed asset paths for code view
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user