diff --git a/session/application.cpp b/session/application.cpp index 2fdf7a5..233f576 100644 --- a/session/application.cpp +++ b/session/application.cpp @@ -145,7 +145,7 @@ void Application::initEnvironments() qunsetenv("QT_FONT_DPI"); qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY", "PassThrough"); - qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); + // qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); // IM Config qputenv("GTK_IM_MODULE", "fcitx5"); diff --git a/settings-daemon/theme/thememanager.cpp b/settings-daemon/theme/thememanager.cpp index 85fb156..eb3fbe5 100644 --- a/settings-daemon/theme/thememanager.cpp +++ b/settings-daemon/theme/thememanager.cpp @@ -163,14 +163,24 @@ void ThemeManager::setDevicePixelRatio(qreal ratio) // Set font dpi // ref kscreen. if (qFuzzyCompare(ratio, 1.0)) { - // if dpi is the default (96) remove the entry rather than setting it + const int scaleDpi = qRound(ratio * 96.0); QProcess proc; - proc.start(QStringLiteral("xrdb"), {QStringLiteral("-quiet"), QStringLiteral("-remove"), QStringLiteral("-nocpp")}); + proc.start(QStringLiteral("xrdb"), {QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp")}); if (proc.waitForStarted()) { - proc.write(QByteArray("Xft.dpi\n")); + proc.write(QByteArray("Xft.dpi: " + QString::number(scaleDpi).toLatin1())); proc.closeWriteChannel(); proc.waitForFinished(); } + + // if dpi is the default (96) remove the entry rather than setting it +// QProcess proc; +// proc.start(QStringLiteral("xrdb"), {QStringLiteral("-quiet"), QStringLiteral("-remove"), QStringLiteral("-nocpp")}); +// if (proc.waitForStarted()) { +// proc.write(QByteArray("Xft.dpi\n")); +// proc.closeWriteChannel(); +// proc.waitForFinished(); +// } + m_settings->setValue("forceFontDPI", 0); } else { const int scaleDpi = qRound(ratio * 96.0); diff --git a/shutdown-ui/IconButton.qml b/shutdown-ui/IconButton.qml index fa0093b..ba067e7 100644 --- a/shutdown-ui/IconButton.qml +++ b/shutdown-ui/IconButton.qml @@ -29,6 +29,7 @@ Item { property string text property string icon + property int iconSize: 52 property bool checked: false signal clicked @@ -56,7 +57,7 @@ Item { ColumnLayout { id: layout anchors.fill: parent - spacing: FishUI.Units.smallSpacing + spacing: FishUI.Units.largeSpacing Item { Layout.fillHeight: true @@ -65,10 +66,9 @@ Item { Image { id: image source: control.icon - width: control.width * 0.5 + sourceSize: Qt.size(width, height) + width: control.iconSize height: width - sourceSize.width: width - sourceSize.height: width Layout.alignment: Qt.AlignCenter } diff --git a/shutdown-ui/icons/system-lock-screen.svg b/shutdown-ui/icons/system-lock-screen.svg index 8eac56d..0abfd96 100755 --- a/shutdown-ui/icons/system-lock-screen.svg +++ b/shutdown-ui/icons/system-lock-screen.svg @@ -1,8 +1,8 @@ - + - + diff --git a/shutdown-ui/icons/system-log-out.svg b/shutdown-ui/icons/system-log-out.svg index dc42ba6..c0b5106 100644 --- a/shutdown-ui/icons/system-log-out.svg +++ b/shutdown-ui/icons/system-log-out.svg @@ -1,8 +1,8 @@ - + - + diff --git a/shutdown-ui/icons/system-reboot.svg b/shutdown-ui/icons/system-reboot.svg index 6dca162..61b7222 100644 --- a/shutdown-ui/icons/system-reboot.svg +++ b/shutdown-ui/icons/system-reboot.svg @@ -1,8 +1,8 @@ - + - + diff --git a/shutdown-ui/icons/system-shutdown.svg b/shutdown-ui/icons/system-shutdown.svg index d116ed7..99e419c 100644 --- a/shutdown-ui/icons/system-shutdown.svg +++ b/shutdown-ui/icons/system-shutdown.svg @@ -1,8 +1,8 @@ - + - + diff --git a/shutdown-ui/icons/system-suspend.svg b/shutdown-ui/icons/system-suspend.svg index c9145c8..a2d20fb 100644 --- a/shutdown-ui/icons/system-suspend.svg +++ b/shutdown-ui/icons/system-suspend.svg @@ -1,9 +1,9 @@ - + - - - + + +