aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/main.cpp
blob: df03b37916e2f983c46788e54f4f584f65acd96a (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/common/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;
  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();
}