From b53527fbe50a953ad0e3225cc812eb76b8a1f82d Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 27 Jun 2019 17:02:58 +0800 Subject: ... --- src/ui/ui_manager.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/ui/ui_manager.cpp') diff --git a/src/ui/ui_manager.cpp b/src/ui/ui_manager.cpp index cc741ec5..376b1b45 100644 --- a/src/ui/ui_manager.cpp +++ b/src/ui/ui_manager.cpp @@ -6,21 +6,22 @@ #include "cru/platform/native/ui_applicaition.hpp" namespace cru::ui { +using namespace cru::platform::graph; PredefineResources::PredefineResources() { - const auto graph_factory = platform::graph::IGraphFactory::GetInstance(); + const auto graph_factory = GraphFactory::GetInstance(); - button_normal_border_brush.reset(static_cast( - graph_factory->CreateSolidColorBrush(colors::black))); - text_block_selection_brush.reset(static_cast( + button_normal_border_brush.reset( + static_cast(graph_factory->CreateSolidColorBrush(colors::black))); + text_block_selection_brush.reset(static_cast( graph_factory->CreateSolidColorBrush(colors::skyblue))); - text_block_text_brush.reset(static_cast( - graph_factory->CreateSolidColorBrush(colors::black))); - text_block_font.reset(graph_factory->CreateFontDescriptor(L"等线", 24.0f)); + text_block_text_brush.reset( + static_cast(graph_factory->CreateSolidColorBrush(colors::black))); + text_block_font.reset(graph_factory->CreateFont(L"等线", 24.0f)); } UiManager* UiManager::GetInstance() { static UiManager* instance = new UiManager(); - platform::native::IUiApplication::GetInstance()->AddOnQuitHandler([] { + platform::native::UiApplication::GetInstance()->AddOnQuitHandler([] { delete instance; instance = nullptr; }); -- cgit v1.2.3