refactor: Remove manual high-dpi support

This removes the --scale command line option.
Qt6 seems to have this already integrated to scale according to the
nativ display settings: https://doc.qt.io/qt-6.8/highdpi.html
Adjusting the scale on a per-application basis is not intended (anymore)
according to the documentation.
Tested on a (near) high-dpi screen.
This commit is contained in:
Lars Toenning
2025-07-20 23:45:20 +02:00
parent b5d9dd2f62
commit 573b7ce550
15 changed files with 2 additions and 338 deletions

View File

@@ -90,9 +90,6 @@ namespace swift::gui
//! CMD line arguments (reset size store)
void addWindowResetSizeOption();
//! CMD line arguments (scale size on DPI screens)
void addWindowScaleSizeOption();
//! Window state
Qt::WindowState getWindowState() const;
@@ -255,13 +252,6 @@ namespace swift::gui
//! Exit application, perform graceful shutdown and exit
static void exit(int retcode = 0);
//! Support for high DPI screens
//! \note Needs to be at the beginning of main
static void highDpiScreenSupport(const QString &scaleFactor = {});
//! Uses the high DPI support?
static bool isUsingHighDpiScreenSupport();
//! Current screen
static QScreen *currentScreen();
@@ -272,16 +262,6 @@ namespace swift::gui
//! Bring any modal dialog to front
static void modalWindowToFront();
//! Parse scale factor if any
//! \deprecated using scaleFactor now
static double parseScaleFactor(int argc, char *argv[]);
//! Get the scale factor
static QString scaleFactor(int argc, char *argv[]);
//! Get a default scale factor
static QString defaultScaleFactorString();
signals:
//! Style sheet changed
void styleSheetsChanged();
@@ -323,7 +303,6 @@ namespace swift::gui
QCommandLineOption m_cmdWindowStateMinimized { "emptyMinimized" }; //!< window state (minimized)
QCommandLineOption m_cmdWindowMode { "emptyWindowMode" }; //!< window mode (flags: frameless ...)
QCommandLineOption m_cmdWindowSizeReset { "emptySizeReset" }; //!< window size reset
QCommandLineOption m_cmdWindowScaleSize { "emptyScale" }; //!< window scale size
CStyleSheetUtility m_styleSheetUtility { this }; //!< style sheet utility
bool m_uiSetupCompleted = false; //!< ui setup completed
bool m_saveMainWidgetState = true; //!< save/restore main widget's state