mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
commit
102fdb1320
@ -384,7 +384,7 @@ public:
|
||||
double GetWindowDensity() const
|
||||
{
|
||||
if (!uiWindow_) {
|
||||
return 0.0;
|
||||
return 1.0;
|
||||
}
|
||||
return static_cast<double>(uiWindow_->GetVirtualPixelRatio());
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ double PipelineBase::GetCurrentDensity()
|
||||
}
|
||||
CHECK_NULL_RETURN(pipelineContext, SystemProperties::GetDefaultResolution());
|
||||
double wmDensity = pipelineContext->GetWindowDensity();
|
||||
if (GreatNotEqual(wmDensity, 0.0)) {
|
||||
if (GreatNotEqual(wmDensity, 1.0)) {
|
||||
return wmDensity;
|
||||
}
|
||||
return pipelineContext->GetDensity();
|
||||
|
@ -282,7 +282,7 @@ public:
|
||||
if (windowDensityCallback_) {
|
||||
return windowDensityCallback_();
|
||||
}
|
||||
return 0.0;
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
int32_t RegisterDensityChangedCallback(std::function<void(double)>&& callback)
|
||||
|
Loading…
Reference in New Issue
Block a user