no message
parent
4490a55f31
commit
d3139ba090
14
Qss.cpp
14
Qss.cpp
|
@ -176,9 +176,9 @@ void QssTtitleBar::mouseMoveEvent( QMouseEvent * ev )
|
|||
QPoint movePt = globalPt - m_pressedPos;
|
||||
parentWidget()->move(movePt);
|
||||
QssMainWindow *parent = static_cast<QssMainWindow*>(parentWidget());
|
||||
if(nullptr != parent){
|
||||
parent->DetectDpiChange();
|
||||
}
|
||||
// if(nullptr != parent){
|
||||
// parent->DetectDpiChange();
|
||||
// }
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -270,10 +270,10 @@ void QssMainWindow::LogicalDpiChange(qreal dpi)
|
|||
qDebug()<<"dpi changed,reason: configuration "<<dpi;
|
||||
m_dpi_ratio = 96/dpi;
|
||||
qDebug()<<"factor is "<<m_dpi_ratio;
|
||||
auto parent = this->parentWidget();
|
||||
parent->setGeometry(parent->geometry().x(),parent->geometry().y(),
|
||||
parent->geometry().width()*m_dpi_ratio,
|
||||
parent->geometry().height()*m_dpi_ratio);
|
||||
// auto parent = this->parentWidget();
|
||||
// parent->setGeometry(parent->geometry().x(),parent->geometry().y(),
|
||||
// parent->geometry().width()*m_dpi_ratio,
|
||||
// parent->geometry().height()*m_dpi_ratio);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue