fix: shouldn't reset DPI when window is reshown
This commit is contained in:
parent
99a47db9bc
commit
8e179dd659
|
@ -175,6 +175,8 @@ int main(int argc, char *argv[])
|
|||
pMainWindow->newEditor();
|
||||
}
|
||||
}
|
||||
if (mainWindow.screen())
|
||||
setScreenDPI(mainWindow.screen()->logicalDotsPerInch());
|
||||
mainWindow.show();
|
||||
#ifdef Q_OS_WIN
|
||||
WindowLogoutEventFilter filter;
|
||||
|
|
|
@ -561,8 +561,6 @@ void MainWindow::updateEditorColorSchemes()
|
|||
|
||||
void MainWindow::applySettings()
|
||||
{
|
||||
qDebug()<<"--- apply settings -- ";
|
||||
qDebug()<<screen()<<screen()->logicalDotsPerInch();
|
||||
ThemeManager themeManager;
|
||||
PAppTheme appTheme = themeManager.theme(pSettings->environment().theme());
|
||||
if (appTheme->isDark())
|
||||
|
@ -576,7 +574,6 @@ void MainWindow::applySettings()
|
|||
mFileInfoStatus->setPalette(appTheme->palette());
|
||||
updateEditorColorSchemes();
|
||||
|
||||
qDebug()<<pointToPixel(pSettings->environment().interfaceFontSize());
|
||||
QFont font(pSettings->environment().interfaceFont());
|
||||
font.setPixelSize(pointToPixel(pSettings->environment().interfaceFontSize()));
|
||||
font.setStyleStrategy(QFont::PreferAntialias);
|
||||
|
@ -626,7 +623,6 @@ void MainWindow::applySettings()
|
|||
updateEditorSettings();
|
||||
updateDebuggerSettings();
|
||||
updateActionIcons();
|
||||
qDebug()<<"*** app setting ****";
|
||||
}
|
||||
|
||||
void MainWindow::applyUISettings()
|
||||
|
@ -698,7 +694,6 @@ void MainWindow::setActiveBreakpoint(QString FileName, int Line, bool setFocus)
|
|||
|
||||
void MainWindow::updateDPI()
|
||||
{
|
||||
qDebug()<<"dpi changed";
|
||||
applySettings();
|
||||
}
|
||||
|
||||
|
@ -3747,7 +3742,6 @@ void MainWindow::closeEvent(QCloseEvent *event) {
|
|||
|
||||
void MainWindow::showEvent(QShowEvent *)
|
||||
{
|
||||
setScreenDPI(screen()->logicalDotsPerInch());
|
||||
applySettings();
|
||||
const Settings::UI& settings = pSettings->ui();
|
||||
ui->tabMessages->setCurrentIndex(settings.bottomPanelIndex());
|
||||
|
|
Loading…
Reference in New Issue