work save
This commit is contained in:
parent
2de2f1e162
commit
0e0689ad64
|
@ -38,6 +38,8 @@ bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray & /*eventType*/
|
|||
}
|
||||
return true;
|
||||
}
|
||||
} else if (pMsg->message == WM_DPICHANGED) {
|
||||
qDebug()<<"app dpi changed!";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -77,6 +79,7 @@ QString getSettingFilename(const QString& filepath = QString()) {
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication app(argc, argv);
|
||||
|
||||
//Translation must be loaded first
|
||||
|
|
|
@ -653,6 +653,7 @@ protected:
|
|||
void closeEvent(QCloseEvent *event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
|
||||
};
|
||||
|
||||
extern MainWindow* pMainWindow;
|
||||
|
|
|
@ -6264,6 +6264,18 @@ void SynEdit::dragLeaveEvent(QDragLeaveEvent *)
|
|||
// showCaret();
|
||||
}
|
||||
|
||||
bool SynEdit::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
MSG* msg = (MSG*)message;
|
||||
if (msg && msg->message == WM_DPICHANGED) {
|
||||
qDebug()<<"dpi changed!";
|
||||
synFontChanged();
|
||||
}
|
||||
#endif
|
||||
return QAbstractScrollArea::nativeEvent(eventType,message,result);
|
||||
}
|
||||
|
||||
int SynEdit::maxScrollHeight() const
|
||||
{
|
||||
if (mOptions.testFlag(eoScrollPastEof))
|
||||
|
|
|
@ -737,6 +737,10 @@ void dragEnterEvent(QDragEnterEvent *event) override;
|
|||
void dropEvent(QDropEvent *event) override;
|
||||
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
||||
};
|
||||
|
||||
#endif // SYNEDIT_H
|
||||
|
|
Loading…
Reference in New Issue