Fixed #27 crashed when DPI changes
Signed-off-by: jiajia_deng <2894220@gmail.com>
This commit is contained in:
parent
9ee965d558
commit
11dbe9344e
@ -58,10 +58,12 @@ UiRect Shadow::GetShadowCorner() const
|
|||||||
|
|
||||||
void Shadow::ResetShadowBox()
|
void Shadow::ResetShadowBox()
|
||||||
{
|
{
|
||||||
|
if (m_bShadowAttached && m_pRoot) {
|
||||||
auto rcTempShadowCorner = m_rcDefaultShadowCorner;
|
auto rcTempShadowCorner = m_rcDefaultShadowCorner;
|
||||||
DpiManager::GetInstance()->ScaleRect(rcTempShadowCorner);
|
DpiManager::GetInstance()->ScaleRect(rcTempShadowCorner);
|
||||||
m_rcShadowCornerBackup = m_rcCurShadowCorner = rcTempShadowCorner;
|
m_rcShadowCornerBackup = m_rcCurShadowCorner = rcTempShadowCorner;
|
||||||
m_pRoot->GetLayout()->SetPadding(m_rcDefaultShadowCorner);
|
m_pRoot->GetLayout()->SetPadding(m_rcDefaultShadowCorner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Box*Shadow::AttachShadow(Box* pRoot)
|
Box*Shadow::AttachShadow(Box* pRoot)
|
||||||
|
Loading…
Reference in New Issue
Block a user