logic: color scheme fixes (#821)
* fixed issues where color scheme entries were missing * removed color scheme entries for nodes and edges that do not exist anymore
This commit is contained in:
@@ -41,7 +41,7 @@ std::string ColorScheme::getNodeTypeColor(
|
||||
{
|
||||
disableWarnings();
|
||||
|
||||
std::string type = getValue<std::string>("graph/node/" + typeStr + "/like", typeStr);
|
||||
const std::string type = getValue<std::string>("graph/node/" + typeStr + "/like", typeStr);
|
||||
std::string color = getValue<std::string>(
|
||||
"graph/node/" + type + "/" + key + "/" + stateToString(state), "");
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ std::string getStyleSheet(const FilePath& path)
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string key = seq.front();
|
||||
const std::string key = seq.front();
|
||||
std::string val = seq.back();
|
||||
|
||||
if (key == "setting")
|
||||
@@ -168,6 +168,10 @@ std::string getStyleSheet(const FilePath& path)
|
||||
}
|
||||
else if (key == "color")
|
||||
{
|
||||
if (!ColorScheme::getInstance()->hasColor(val))
|
||||
{
|
||||
LOG_WARNING("Color scheme does not provide value for key \"" + val + "\" requested by style \"" + path.str() + "\".");
|
||||
}
|
||||
val = ColorScheme::getInstance()->getColor(val);
|
||||
}
|
||||
else if (key == "platform_wml")
|
||||
|
||||
@@ -293,7 +293,7 @@ void QtErrorView::setStyleSheet() const
|
||||
{
|
||||
QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
|
||||
utility::setWidgetBackgroundColor(
|
||||
widget, ColorScheme::getInstance()->getColor("error/background"));
|
||||
widget, ColorScheme::getInstance()->getColor("window/background"));
|
||||
|
||||
QPalette palette(m_showErrors->palette());
|
||||
palette.setColor(
|
||||
|
||||
@@ -68,7 +68,7 @@ void QtStatusView::refreshView()
|
||||
m_onQtThread([this]() {
|
||||
QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
|
||||
utility::setWidgetBackgroundColor(
|
||||
widget, ColorScheme::getInstance()->getColor("error/background"));
|
||||
widget, ColorScheme::getInstance()->getColor("window/background"));
|
||||
|
||||
QPalette palette(m_showErrors->palette());
|
||||
palette.setColor(
|
||||
|
||||
Reference in New Issue
Block a user