diff --git a/resources/DefaultStyle.json b/resources/DefaultStyle.json index 8375b4a1..7b279e31 100644 --- a/resources/DefaultStyle.json +++ b/resources/DefaultStyle.json @@ -37,6 +37,6 @@ "ConstructionLineWidth": 2.0, "PointDiameter": 10.0, - "UseDataDefinedColors": false + "UseDataDefinedColors": true } -} +} \ No newline at end of file diff --git a/src/noggit/Red/NodeEditor/NodeRegistry.hpp b/src/noggit/Red/NodeEditor/NodeRegistry.hpp index 2d9cd2b0..baa41264 100644 --- a/src/noggit/Red/NodeEditor/NodeRegistry.hpp +++ b/src/noggit/Red/NodeEditor/NodeRegistry.hpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include #include @@ -121,6 +123,8 @@ using QtNodes::DataModelRegistry; using QtNodes::FlowScene; using QtNodes::FlowView; using QtNodes::ConnectionStyle; +using QtNodes::FlowViewStyle; +using QtNodes::NodeStyle; using QtNodes::TypeConverter; using QtNodes::TypeConverterId; @@ -311,54 +315,8 @@ namespace noggit QByteArray save_data = json_file.readAll(); ConnectionStyle::setConnectionStyle(save_data); - } - else - { - ConnectionStyle::setConnectionStyle( - R"( - { - "FlowViewStyle": { - "BackgroundColor": [53, 53, 53], - "FineGridColor": [60, 60, 60], - "CoarseGridColor": [25, 25, 25] - }, - "NodeStyle": { - "NormalBoundaryColor": [255, 255, 255], - "SelectedBoundaryColor": [255, 165, 0], - "GradientColor0": "gray", - "GradientColor1": [80, 80, 80], - "GradientColor2": [64, 64, 64], - "GradientColor3": [58, 58, 58], - "ShadowColor": [20, 20, 20], - "FontColor" : "white", - "FontColorFaded" : "gray", - "ConnectionPointColor": [169, 169, 169], - "FilledConnectionPointColor": "cyan", - "ErrorColor": "red", - "WarningColor": [128, 128, 0], - - "PenWidth": 1.0, - "HoveredPenWidth": 1.5, - - "ConnectionPointDiameter": 8.0, - - "Opacity": 0.8 - }, - "ConnectionStyle": { - "ConstructionColor": "gray", - "NormalColor": "darkcyan", - "SelectedColor": [100, 100, 100], - "SelectedHaloColor": "orange", - "HoveredColor": "lightcyan", - - "LineWidth": 3.0, - "ConstructionLineWidth": 2.0, - "PointDiameter": 10.0, - - "UseDataDefinedColors": true - } - } - )"); + FlowViewStyle::setStyle(save_data); + NodeStyle::setNodeStyle(save_data); } } }