From 04610023deab950a2bbca9d5f04129d981c5d6b2 Mon Sep 17 00:00:00 2001 From: Young Hahn Date: Sun, 1 Jun 2014 13:50:32 -0400 Subject: [PATCH] Load stylesheet from disk. --- linux/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/linux/main.cpp b/linux/main.cpp index 2c7440c87..f796a2351 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -3,6 +3,8 @@ #include #include +#include +#include #include "../common/settings_json.hpp" #include "../common/glfw_view.hpp" @@ -40,6 +42,11 @@ int main(int argc, char *argv[]) { sigIntHandler.sa_flags = 0; sigaction(SIGINT, &sigIntHandler, NULL); + // read default stylesheet from disk + std::ifstream stylefile("./build/Release/style.min.js"); + std::stringstream stylejson; + stylejson << stylefile.rdbuf(); + view = new GLFWView(); llmr::Map map(*view); @@ -49,6 +56,9 @@ int main(int argc, char *argv[]) { map.setAngle(settings.angle); map.setDebug(settings.debug); + // Load style + map.setStyleJSON(stylejson.str()); + int ret = view->run(); // Save settings