aboutsummaryrefslogtreecommitdiff
path: root/src/ThemeBuilder/main.cpp
blob: 4f4ffe4a6d9e1545f3367e5c62f4f8c74d65e7cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "components/MainWindow.h"
#include "cru/base/io/Resource.h"
#include "cru/platform/bootstrap/Bootstrap.h"
#include "cru/ui/ThemeManager.h"
#include "cru/ui/ThemeResourceDictionary.h"

int main() {
  using namespace cru::theme_builder::components;
  using namespace cru::ui;

  auto resource_dir = cru::io::GetResourceDir();

  ThemeManager::GetInstance()->PrependThemeResourceDictionary(
      ThemeResourceDictionary::FromFile(
          resource_dir / "cru/theme_builder/ThemeResources.xml"));

  std::unique_ptr<cru::platform::gui::IUiApplication> application(
      cru::platform::bootstrap::CreateUiApplication());

  auto main_window = std::make_unique<MainWindow>();

  main_window->Show();

  return application->Run();
}