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