From 82431bd0b7e971b956a6a6942538adc8df2ac38c Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 26 Oct 2021 16:36:53 +0800 Subject: ... --- src/osx/graphics/quartz/Brush.cpp | 4 ++++ src/ui/UiManager.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osx/graphics/quartz/Brush.cpp b/src/osx/graphics/quartz/Brush.cpp index 9daa8e13..b55ff4e8 100644 --- a/src/osx/graphics/quartz/Brush.cpp +++ b/src/osx/graphics/quartz/Brush.cpp @@ -7,6 +7,7 @@ QuartzSolidColorBrush::QuartzSolidColorBrush(IGraphicsFactory* graphics_factory, cg_color_ = CGColorCreateGenericRGB(color.GetFloatRed(), color.GetFloatGreen(), color.GetFloatBlue(), color.GetFloatAlpha()); + Ensures(cg_color_); } QuartzSolidColorBrush::~QuartzSolidColorBrush() { CGColorRelease(cg_color_); } @@ -17,9 +18,12 @@ void QuartzSolidColorBrush::SetColor(const Color& color) { cg_color_ = CGColorCreateGenericRGB(color.GetFloatRed(), color.GetFloatGreen(), color.GetFloatBlue(), color.GetFloatAlpha()); + Ensures(cg_color_); } void QuartzSolidColorBrush::Select(CGContextRef context) { + Expects(context); + Expects(cg_color_); CGContextSetStrokeColorWithColor(context, cg_color_); CGContextSetFillColorWithColor(context, cg_color_); } diff --git a/src/ui/UiManager.cpp b/src/ui/UiManager.cpp index fde82eed..879ea2e1 100644 --- a/src/ui/UiManager.cpp +++ b/src/ui/UiManager.cpp @@ -40,7 +40,7 @@ UiManager* UiManager::GetInstance() { UiManager::UiManager() { const auto factory = GetGraphicsFactory(); - theme_resource_.default_font_family = u"等线"; + theme_resource_.default_font_family = u""; theme_resource_.default_font = factory->CreateFont(theme_resource_.default_font_family, 24.0f); -- cgit v1.2.3