diff --git a/NEWS.md b/NEWS.md index 6381c363..944595a5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,7 +9,7 @@ Red Panda C++ Version 0.14.5 - enhancement: add option "hide symbols start with underscore" and "hide synbols start with two underscore" - fix: can't rename project files that not openned in editor - enhancement: group undo will stop at spaces - + - fix: menu font size is wrong when dpi changed Red Panda C++ Version 0.14.4 - enhancement: git - log diff --git a/RedPandaIDE/main.cpp b/RedPandaIDE/main.cpp index e6e1870a..6814248a 100644 --- a/RedPandaIDE/main.cpp +++ b/RedPandaIDE/main.cpp @@ -239,6 +239,14 @@ void setTheme(const QString& theme) { int main(int argc, char *argv[]) { //QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +//#ifdef Q_OS_WIN +// QApplication::setAttribute(Qt::AA_DisableHighDpiScaling); +// QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); +// qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY","PassThrough"); +// qputenv("QT_DEVICE_PIXEL_RATIO ","auto"); +// qputenv("QT_AUTO_SCREEN_SCALE_FACTOR","false"); +//#endif + QApplication app(argc, argv); QFile tempFile(QDir::tempPath()+QDir::separator()+"RedPandaDevCppStartUp.lock"); diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 39a72a4c..aa21d07b 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -752,7 +752,7 @@ void MainWindow::setActiveBreakpoint(QString FileName, int Line, bool setFocus) void MainWindow::updateDPI(int oldDPI, int newDPI) { - applySettings(); + //applySettings(); if (oldDPI<1) oldDPI = 1; mBottomPanelHeight = mBottomPanelHeight * newDPI / oldDPI ; @@ -4147,6 +4147,7 @@ void MainWindow::hideEvent(QHideEvent *) bool MainWindow::event(QEvent *event) { if (event->type()==DPI_CHANGED_EVENT) { + applySettings(); int saveHeight = mBottomPanelHeight ; int saveWidth = mLeftPanelWidth; openCloseBottomPanel(mBottomPanelOpenned);