diff --git a/s/sddm/manifest.x86_64.bin b/s/sddm/manifest.x86_64.bin index dcb2fb0c2..060b50245 100644 Binary files a/s/sddm/manifest.x86_64.bin and b/s/sddm/manifest.x86_64.bin differ diff --git a/s/sddm/manifest.x86_64.jsonc b/s/sddm/manifest.x86_64.jsonc index 87be03d82..24aaff64f 100644 --- a/s/sddm/manifest.x86_64.jsonc +++ b/s/sddm/manifest.x86_64.jsonc @@ -4,9 +4,9 @@ "packages": { "sddm": { "build-depends": [ - "cmake(Qt5LinguistTools)", - "pkgconfig(Qt5Core)", - "pkgconfig(Qt5Qml)", + "cmake(Qt6LinguistTools)", + "pkgconfig(Qt6Core)", + "pkgconfig(Qt6Qml)", "pkgconfig(gl)", "pkgconfig(libsystemd)", "pkgconfig(pam)", @@ -15,12 +15,13 @@ ], "depends": [ "interpreter(/usr/lib/ld-linux-x86-64.so.2(x86_64))", - "soname(libQt5Core.so.5(x86_64))", - "soname(libQt5DBus.so.5(x86_64))", - "soname(libQt5Gui.so.5(x86_64))", - "soname(libQt5Network.so.5(x86_64))", - "soname(libQt5Qml.so.5(x86_64))", - "soname(libQt5Quick.so.5(x86_64))", + "qt6-wayland", + "soname(libQt6Core.so.6(x86_64))", + "soname(libQt6DBus.so.6(x86_64))", + "soname(libQt6Gui.so.6(x86_64))", + "soname(libQt6Network.so.6(x86_64))", + "soname(libQt6Qml.so.6(x86_64))", + "soname(libQt6Quick.so.6(x86_64))", "soname(libXau.so.6(x86_64))", "soname(libc++.so.1(x86_64))", "soname(libc.so.6(x86_64))", @@ -32,20 +33,31 @@ ], "files": [ "/usr/bin/sddm", - "/usr/bin/sddm-greeter", - "/usr/lib/qt5/qml/SddmComponents/Background.qml", - "/usr/lib/qt5/qml/SddmComponents/Button.qml", - "/usr/lib/qt5/qml/SddmComponents/Clock.qml", - "/usr/lib/qt5/qml/SddmComponents/ComboBox.qml", - "/usr/lib/qt5/qml/SddmComponents/ImageButton.qml", - "/usr/lib/qt5/qml/SddmComponents/LayoutBox.qml", - "/usr/lib/qt5/qml/SddmComponents/Menu.qml", - "/usr/lib/qt5/qml/SddmComponents/PasswordBox.qml", - "/usr/lib/qt5/qml/SddmComponents/PictureBox.qml", - "/usr/lib/qt5/qml/SddmComponents/TextBox.qml", - "/usr/lib/qt5/qml/SddmComponents/TextConstants.qml", - "/usr/lib/qt5/qml/SddmComponents/qmldir", - "/usr/lib/qt5/qml/SddmComponents/warning.png", + "/usr/bin/sddm-greeter-qt6", + "/usr/lib/qt6/qml/SddmComponents/Background.qml", + "/usr/lib/qt6/qml/SddmComponents/Background.qmlc", + "/usr/lib/qt6/qml/SddmComponents/Button.qml", + "/usr/lib/qt6/qml/SddmComponents/Button.qmlc", + "/usr/lib/qt6/qml/SddmComponents/Clock.qml", + "/usr/lib/qt6/qml/SddmComponents/Clock.qmlc", + "/usr/lib/qt6/qml/SddmComponents/ComboBox.qml", + "/usr/lib/qt6/qml/SddmComponents/ComboBox.qmlc", + "/usr/lib/qt6/qml/SddmComponents/ImageButton.qml", + "/usr/lib/qt6/qml/SddmComponents/ImageButton.qmlc", + "/usr/lib/qt6/qml/SddmComponents/LayoutBox.qml", + "/usr/lib/qt6/qml/SddmComponents/LayoutBox.qmlc", + "/usr/lib/qt6/qml/SddmComponents/Menu.qml", + "/usr/lib/qt6/qml/SddmComponents/Menu.qmlc", + "/usr/lib/qt6/qml/SddmComponents/PasswordBox.qml", + "/usr/lib/qt6/qml/SddmComponents/PasswordBox.qmlc", + "/usr/lib/qt6/qml/SddmComponents/PictureBox.qml", + "/usr/lib/qt6/qml/SddmComponents/PictureBox.qmlc", + "/usr/lib/qt6/qml/SddmComponents/TextBox.qml", + "/usr/lib/qt6/qml/SddmComponents/TextBox.qmlc", + "/usr/lib/qt6/qml/SddmComponents/TextConstants.qml", + "/usr/lib/qt6/qml/SddmComponents/TextConstants.qmlc", + "/usr/lib/qt6/qml/SddmComponents/qmldir", + "/usr/lib/qt6/qml/SddmComponents/warning.png", "/usr/lib/sddm/sddm-helper", "/usr/lib/sddm/sddm-helper-start-wayland", "/usr/lib/sddm/sddm-helper-start-x11user", @@ -146,6 +158,7 @@ "/usr/share/sddm/scripts/Xstop", "/usr/share/sddm/scripts/wayland-session", "/usr/share/sddm/themes/elarun/Main.qml", + "/usr/share/sddm/themes/elarun/Main.qmlc", "/usr/share/sddm/themes/elarun/README", "/usr/share/sddm/themes/elarun/angle-down.png", "/usr/share/sddm/themes/elarun/elarun.jpg", @@ -166,6 +179,7 @@ "/usr/share/sddm/themes/elarun/theme.conf", "/usr/share/sddm/themes/maldives/LICENSE", "/usr/share/sddm/themes/maldives/Main.qml", + "/usr/share/sddm/themes/maldives/Main.qmlc", "/usr/share/sddm/themes/maldives/README", "/usr/share/sddm/themes/maldives/angle-down.png", "/usr/share/sddm/themes/maldives/background.jpg", @@ -175,9 +189,12 @@ "/usr/share/sddm/themes/maldives/theme.conf", "/usr/share/sddm/themes/maya/LICENSE", "/usr/share/sddm/themes/maya/Main.qml", + "/usr/share/sddm/themes/maya/Main.qmlc", "/usr/share/sddm/themes/maya/README", "/usr/share/sddm/themes/maya/components/SpButton.qml", + "/usr/share/sddm/themes/maya/components/SpButton.qmlc", "/usr/share/sddm/themes/maya/components/SpClock.qml", + "/usr/share/sddm/themes/maya/components/SpClock.qmlc", "/usr/share/sddm/themes/maya/fonts/OpenSans_CondLight.ttf", "/usr/share/sddm/themes/maya/images/ic_arrow_drop_down_white_24px.svg", "/usr/share/sddm/themes/maya/images/ic_power_settings_new_white_24px.svg", @@ -186,59 +203,59 @@ "/usr/share/sddm/themes/maya/metadata.desktop", "/usr/share/sddm/themes/maya/screenshots/hi_IN.png", "/usr/share/sddm/themes/maya/theme.conf", - "/usr/share/sddm/translations-qt5/ar.qm", - "/usr/share/sddm/translations-qt5/bg.qm", - "/usr/share/sddm/translations-qt5/bn.qm", - "/usr/share/sddm/translations-qt5/ca.qm", - "/usr/share/sddm/translations-qt5/cs.qm", - "/usr/share/sddm/translations-qt5/da.qm", - "/usr/share/sddm/translations-qt5/de.qm", - "/usr/share/sddm/translations-qt5/es.qm", - "/usr/share/sddm/translations-qt5/et.qm", - "/usr/share/sddm/translations-qt5/eu.qm", - "/usr/share/sddm/translations-qt5/fi.qm", - "/usr/share/sddm/translations-qt5/fr.qm", - "/usr/share/sddm/translations-qt5/gl.qm", - "/usr/share/sddm/translations-qt5/he.qm", - "/usr/share/sddm/translations-qt5/hi_IN.qm", - "/usr/share/sddm/translations-qt5/hu.qm", - "/usr/share/sddm/translations-qt5/ie.qm", - "/usr/share/sddm/translations-qt5/is.qm", - "/usr/share/sddm/translations-qt5/it.qm", - "/usr/share/sddm/translations-qt5/ja.qm", - "/usr/share/sddm/translations-qt5/ka.qm", - "/usr/share/sddm/translations-qt5/kk.qm", - "/usr/share/sddm/translations-qt5/ko.qm", - "/usr/share/sddm/translations-qt5/lt.qm", - "/usr/share/sddm/translations-qt5/lv.qm", - "/usr/share/sddm/translations-qt5/nb.qm", - "/usr/share/sddm/translations-qt5/nl.qm", - "/usr/share/sddm/translations-qt5/nn.qm", - "/usr/share/sddm/translations-qt5/oc.qm", - "/usr/share/sddm/translations-qt5/pl.qm", - "/usr/share/sddm/translations-qt5/pt_BR.qm", - "/usr/share/sddm/translations-qt5/pt_PT.qm", - "/usr/share/sddm/translations-qt5/ro.qm", - "/usr/share/sddm/translations-qt5/ru.qm", - "/usr/share/sddm/translations-qt5/sk.qm", - "/usr/share/sddm/translations-qt5/sr.qm", - "/usr/share/sddm/translations-qt5/sr@ijekavian.qm", - "/usr/share/sddm/translations-qt5/sr@ijekavianlatin.qm", - "/usr/share/sddm/translations-qt5/sr@latin.qm", - "/usr/share/sddm/translations-qt5/sv.qm", - "/usr/share/sddm/translations-qt5/tr.qm", - "/usr/share/sddm/translations-qt5/uk.qm", - "/usr/share/sddm/translations-qt5/zh_CN.qm", - "/usr/share/sddm/translations-qt5/zh_TW.qm" + "/usr/share/sddm/translations-qt6/ar.qm", + "/usr/share/sddm/translations-qt6/bg.qm", + "/usr/share/sddm/translations-qt6/bn.qm", + "/usr/share/sddm/translations-qt6/ca.qm", + "/usr/share/sddm/translations-qt6/cs.qm", + "/usr/share/sddm/translations-qt6/da.qm", + "/usr/share/sddm/translations-qt6/de.qm", + "/usr/share/sddm/translations-qt6/es.qm", + "/usr/share/sddm/translations-qt6/et.qm", + "/usr/share/sddm/translations-qt6/eu.qm", + "/usr/share/sddm/translations-qt6/fi.qm", + "/usr/share/sddm/translations-qt6/fr.qm", + "/usr/share/sddm/translations-qt6/gl.qm", + "/usr/share/sddm/translations-qt6/he.qm", + "/usr/share/sddm/translations-qt6/hi_IN.qm", + "/usr/share/sddm/translations-qt6/hu.qm", + "/usr/share/sddm/translations-qt6/ie.qm", + "/usr/share/sddm/translations-qt6/is.qm", + "/usr/share/sddm/translations-qt6/it.qm", + "/usr/share/sddm/translations-qt6/ja.qm", + "/usr/share/sddm/translations-qt6/ka.qm", + "/usr/share/sddm/translations-qt6/kk.qm", + "/usr/share/sddm/translations-qt6/ko.qm", + "/usr/share/sddm/translations-qt6/lt.qm", + "/usr/share/sddm/translations-qt6/lv.qm", + "/usr/share/sddm/translations-qt6/nb.qm", + "/usr/share/sddm/translations-qt6/nl.qm", + "/usr/share/sddm/translations-qt6/nn.qm", + "/usr/share/sddm/translations-qt6/oc.qm", + "/usr/share/sddm/translations-qt6/pl.qm", + "/usr/share/sddm/translations-qt6/pt_BR.qm", + "/usr/share/sddm/translations-qt6/pt_PT.qm", + "/usr/share/sddm/translations-qt6/ro.qm", + "/usr/share/sddm/translations-qt6/ru.qm", + "/usr/share/sddm/translations-qt6/sk.qm", + "/usr/share/sddm/translations-qt6/sr.qm", + "/usr/share/sddm/translations-qt6/sr@ijekavian.qm", + "/usr/share/sddm/translations-qt6/sr@ijekavianlatin.qm", + "/usr/share/sddm/translations-qt6/sr@latin.qm", + "/usr/share/sddm/translations-qt6/sv.qm", + "/usr/share/sddm/translations-qt6/tr.qm", + "/usr/share/sddm/translations-qt6/uk.qm", + "/usr/share/sddm/translations-qt6/zh_CN.qm", + "/usr/share/sddm/translations-qt6/zh_TW.qm" ], "name": "sddm", "provides": [ "binary(sddm)", - "binary(sddm-greeter)" + "binary(sddm-greeter-qt6)" ] } }, "source-name": "sddm", - "source-release": "1", + "source-release": "2", "source-version": "0.21.0" } diff --git a/s/sddm/pkg/make-qt6-themes-default.patch b/s/sddm/pkg/make-qt6-themes-default.patch new file mode 100644 index 000000000..b9e95a5a3 --- /dev/null +++ b/s/sddm/pkg/make-qt6-themes-default.patch @@ -0,0 +1,67 @@ +From 52175648f4e1b415f93b24a3ef970983024659f2 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Wed, 28 Feb 2024 16:47:16 -0500 +Subject: [PATCH] Default to Qt6 and always use versioned greeters + +Distributors can handle creating an unversioned name if necessary. +--- + src/common/ThemeMetadata.cpp | 4 ++-- + src/daemon/Greeter.cpp | 3 +-- + src/greeter/CMakeLists.txt | 9 +-------- + 3 files changed, 4 insertions(+), 12 deletions(-) + +diff --git a/src/common/ThemeMetadata.cpp b/src/common/ThemeMetadata.cpp +index 2cb3762..003056a 100644 +--- a/src/common/ThemeMetadata.cpp ++++ b/src/common/ThemeMetadata.cpp +@@ -28,7 +28,7 @@ namespace SDDM { + QString mainScript { QStringLiteral("Main.qml") }; + QString configFile; + QString translationsDirectory { QStringLiteral(".") }; +- int qtVersion = 5; ++ int qtVersion = 6; + }; + + ThemeMetadata::ThemeMetadata(const QString &path, QObject *parent) : QObject(parent), d(new ThemeMetadataPrivate()) { +@@ -61,6 +61,6 @@ namespace SDDM { + d->mainScript = settings.value(QStringLiteral("SddmGreeterTheme/MainScript"), QStringLiteral("Main.qml")).toString(); + d->configFile = settings.value(QStringLiteral("SddmGreeterTheme/ConfigFile"), QStringLiteral("theme.conf")).toString(); + d->translationsDirectory = settings.value(QStringLiteral("SddmGreeterTheme/TranslationsDirectory"), QStringLiteral(".")).toString(); +- d->qtVersion = settings.value(QStringLiteral("SddmGreeterTheme/QtVersion"), 5).toInt(); ++ d->qtVersion = settings.value(QStringLiteral("SddmGreeterTheme/QtVersion"), 6).toInt(); + } + } +diff --git a/src/daemon/Greeter.cpp b/src/daemon/Greeter.cpp +index 07fccde..5a956b6 100644 +--- a/src/daemon/Greeter.cpp ++++ b/src/daemon/Greeter.cpp +@@ -82,8 +82,7 @@ namespace SDDM { + + QString Greeter::greeterPathForQt(int qtVersion) + { +- const QString suffix = qtVersion == 5 ? QString() : QStringLiteral("-qt%1").arg(qtVersion); +- return QStringLiteral(BIN_INSTALL_DIR "/sddm-greeter%1").arg(suffix); ++ return QStringLiteral(BIN_INSTALL_DIR "/sddm-greeter-qt%1").arg(qtVersion); + } + + bool Greeter::start() { +diff --git a/src/greeter/CMakeLists.txt b/src/greeter/CMakeLists.txt +index 72769e4..524368d 100644 +--- a/src/greeter/CMakeLists.txt ++++ b/src/greeter/CMakeLists.txt +@@ -1,11 +1,4 @@ +-if(QT_MAJOR_VERSION EQUAL "5") +- # Keep the unversioned name for Qt5. When upgrading SDDM, the old daemon +- # might still be running and only know about "sddm-greeter". Keeping the +- # previous name around also helps users calling it directly. +- set(GREETER_TARGET sddm-greeter) +-else() +- set(GREETER_TARGET sddm-greeter-qt${QT_MAJOR_VERSION}) +-endif() ++set(GREETER_TARGET sddm-greeter-qt${QT_MAJOR_VERSION}) + + message(STATUS "Building greeter for Qt ${QT_MAJOR_VERSION} as ${GREETER_TARGET}") + +-- +2.43.0 + diff --git a/s/sddm/pkg/qt6-themes.patch b/s/sddm/pkg/qt6-themes.patch new file mode 100644 index 000000000..c0a89faa5 --- /dev/null +++ b/s/sddm/pkg/qt6-themes.patch @@ -0,0 +1,1018 @@ +From 6831a26862e15347296a48a9b7825c7db7b5b957 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Tue, 30 Jan 2024 20:16:25 -0800 +Subject: [PATCH 1/7] Mark keyboard backend as disabled on Wayland + +8c370d9 already cleared the list of layouts, but Num/Caps indicators +are also not supported on Wayland. Let's communicate that clearly by +marking the KeyboardModel as disabled. +--- + src/greeter/waylandkeyboardbackend.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/greeter/waylandkeyboardbackend.cpp b/src/greeter/waylandkeyboardbackend.cpp +index fcea53614..c42bee6f2 100644 +--- a/src/greeter/waylandkeyboardbackend.cpp ++++ b/src/greeter/waylandkeyboardbackend.cpp +@@ -95,6 +95,7 @@ void WaylandKeyboardBackend::init() + // TODO: We can't actually switch keyboard layout yet, so don't populate a list of layouts + // so that themes can know to not show the option to change layout + // d->layouts = parseRules(QStringLiteral("/usr/share/X11/xkb/rules/evdev.xml"), d->layout_id); ++ d->enabled = false; + } + + void WaylandKeyboardBackend::disconnect() + +From e490bb994ada2a565e95fd32fb18818b1f05ff82 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Tue, 30 Jan 2024 21:10:15 -0800 +Subject: [PATCH 2/7] Themes: hide LayoutBox when keyboard model is empty or + disabled + +--- + data/themes/elarun/Main.qml | 4 ++++ + data/themes/maldives/Main.qml | 2 ++ + data/themes/maya/Main.qml | 4 ++++ + src/greeter/theme/Main.qml | 4 ++++ + 4 files changed, 14 insertions(+) + +diff --git a/data/themes/elarun/Main.qml b/data/themes/elarun/Main.qml +index e559b741b..523dab7b3 100644 +--- a/data/themes/elarun/Main.qml ++++ b/data/themes/elarun/Main.qml +@@ -270,6 +270,8 @@ Rectangle { + height: parent.height + anchors.verticalCenter: parent.verticalCenter + ++ visible: layoutBox.visible ++ + text: textConstants.layout + font.pixelSize: 14 + verticalAlignment: Text.AlignVCenter +@@ -281,6 +283,8 @@ Rectangle { + anchors.verticalCenter: parent.verticalCenter + font.pixelSize: 14 + ++ visible: keyboard.enabled && keyboard.layouts.length > 0 ++ + arrowIcon: "angle-down.png" + + KeyNavigation.backtab: session; KeyNavigation.tab: user_entry +diff --git a/data/themes/maldives/Main.qml b/data/themes/maldives/Main.qml +index 4fac9f3c5..7f1959a5f 100644 +--- a/data/themes/maldives/Main.qml ++++ b/data/themes/maldives/Main.qml +@@ -201,6 +201,8 @@ Rectangle { + spacing : 4 + anchors.bottom: parent.bottom + ++ visible: keyboard.enabled && keyboard.layouts.length > 0 ++ + Text { + id: lblLayout + width: parent.width +diff --git a/data/themes/maya/Main.qml b/data/themes/maya/Main.qml +index d8e470b39..d166b718c 100644 +--- a/data/themes/maya/Main.qml ++++ b/data/themes/maya/Main.qml +@@ -239,6 +239,8 @@ Rectangle { + width : spUnit * 2 + height : parent.height + ++ visible : keyboard.enabled && keyboard.layouts.length > 0 ++ + color : primaryHue1 + borderColor : primaryHue3 + focusColor : accentLight +@@ -261,6 +263,8 @@ Rectangle { + + text : textConstants.layout + ++ visible : maya_layout.visible ++ + color : normalText + + font.family : opensans_cond_light.name +diff --git a/src/greeter/theme/Main.qml b/src/greeter/theme/Main.qml +index 0a2ab9c84..2106f6004 100644 +--- a/src/greeter/theme/Main.qml ++++ b/src/greeter/theme/Main.qml +@@ -236,6 +236,8 @@ Rectangle { + height: parent.height + anchors.verticalCenter: parent.verticalCenter + ++ visible: layoutBox.visible ++ + text: textConstants.layout + font.pixelSize: 16 + verticalAlignment: Text.AlignVCenter +@@ -247,6 +249,8 @@ Rectangle { + anchors.verticalCenter: parent.verticalCenter + font.pixelSize: 14 + ++ visible: keyboard.enabled && keyboard.layouts.length > 0 ++ + arrowIcon: "angle-down.png" + + KeyNavigation.backtab: session; KeyNavigation.tab: btnShutdown + +From a8dad084766a31d92252b2c2707c778dca1f30cc Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Wed, 31 Jan 2024 02:08:47 -0800 +Subject: [PATCH 3/7] Themes: explicitly resolve image URLs + +Qt6 no longer resolves relative URLs on assignment to a property of type +url[^1]. The resolution now happens late, in the context of the item that +uses the URL. In our case, it would be a QML component containing Image. +However, the themes shipped with SDDM contain resources in the theme +directories and rely on the previous algorithm of the URL resolution. + +The only documented[^2] way to address that is to resolve the paths in +advance with `Qt.resolvedUrl` to avoid any ambiguity. `Qt.resolvedUrl` +is supported in Qt5, so that should be a safe, albeit a bit verbose, +conversion. + +Fixes following error: +``` +file:///usr/lib64/qt6/qml/SddmComponents/ComboBox.qml:105:9: QML Image: Cannot open: file:///usr/lib64/qt6/qml/SddmComponents/angle-down.png +``` + +[^1]: https://doc.qt.io/qt-6/qml-url.html +[^2]: `QQmlAbstractUrlInterceptor` exists in Qt5, but + `QQmlEngine::setUrlInterceptor` is undocumented and has potential +negative side-effects. It also receives already resolved absolute URLs. +--- + data/themes/elarun/Main.qml | 29 +++++++++++++++-------------- + data/themes/maldives/Main.qml | 13 +++++++------ + data/themes/maya/Main.qml | 10 +++++----- + docs/THEMING.md | 2 +- + src/greeter/theme/Main.qml | 14 +++++++------- + 5 files changed, 35 insertions(+), 33 deletions(-) + +diff --git a/data/themes/elarun/Main.qml b/data/themes/elarun/Main.qml +index 523dab7b3..8151bb52a 100644 +--- a/data/themes/elarun/Main.qml ++++ b/data/themes/elarun/Main.qml +@@ -50,11 +50,12 @@ Rectangle { + + Background { + anchors.fill: parent +- source: config.background ++ source: Qt.resolvedUrl(config.background) + fillMode: Image.PreserveAspectCrop + onStatusChanged: { +- if (status == Image.Error && source != config.defaultBackground) { +- source = config.defaultBackground ++ var defaultBackground = Qt.resolvedUrl(config.defaultBackground) ++ if (status == Image.Error && source != defaultBackground) { ++ source = defaultBackground + } + } + } +@@ -72,12 +73,12 @@ Rectangle { + + Image { + anchors.fill: parent +- source: "images/rectangle.png" ++ source: Qt.resolvedUrl("images/rectangle.png") + } + + Image { + anchors.fill: parent +- source: "images/rectangle_overlay.png" ++ source: Qt.resolvedUrl("images/rectangle_overlay.png") + opacity: 0.1 + } + +@@ -103,7 +104,7 @@ Rectangle { + anchors.centerIn: parent + + Row { +- Image { source: "images/user_icon.png" } ++ Image { source: Qt.resolvedUrl("images/user_icon.png") } + + TextBox { + id: user_entry +@@ -121,7 +122,7 @@ Rectangle { + + Row { + +- Image { source: "images/lock.png" } ++ Image { source: Qt.resolvedUrl("images/lock.png") } + + PasswordBox { + id: pw_entry +@@ -150,7 +151,7 @@ Rectangle { + anchors.verticalCenter: parent.verticalCenter + anchors.margins: 20 + +- source: "images/login_normal.png" ++ source: Qt.resolvedUrl("images/login_normal.png") + + onClicked: sddm.login(user_entry.text, pw_entry.text, sessionIndex) + +@@ -171,7 +172,7 @@ Rectangle { + + ImageButton { + id: system_button +- source: "images/system_shutdown.png" ++ source: Qt.resolvedUrl("images/system_shutdown.png") + onClicked: sddm.powerOff() + + KeyNavigation.backtab: session; KeyNavigation.tab: reboot_button +@@ -179,7 +180,7 @@ Rectangle { + + ImageButton { + id: reboot_button +- source: "images/system_reboot.png" ++ source: Qt.resolvedUrl("images/system_reboot.png") + onClicked: sddm.reboot() + + KeyNavigation.backtab: system_button; KeyNavigation.tab: suspend_button +@@ -187,7 +188,7 @@ Rectangle { + + ImageButton { + id: suspend_button +- source: "images/system_suspend.png" ++ source: Qt.resolvedUrl("images/system_suspend.png") + visible: sddm.canSuspend + onClicked: sddm.suspend() + +@@ -196,7 +197,7 @@ Rectangle { + + ImageButton { + id: hibernate_button +- source: "images/system_hibernate.png" ++ source: Qt.resolvedUrl("images/system_hibernate.png") + visible: sddm.canHibernate + onClicked: sddm.hibernate() + +@@ -256,7 +257,7 @@ Rectangle { + width: 245 + anchors.verticalCenter: parent.verticalCenter + +- arrowIcon: "angle-down.png" ++ arrowIcon: Qt.resolvedUrl("angle-down.png") + + model: sessionModel + index: sessionModel.lastIndex +@@ -285,7 +286,7 @@ Rectangle { + + visible: keyboard.enabled && keyboard.layouts.length > 0 + +- arrowIcon: "angle-down.png" ++ arrowIcon: Qt.resolvedUrl("angle-down.png") + + KeyNavigation.backtab: session; KeyNavigation.tab: user_entry + } +diff --git a/data/themes/maldives/Main.qml b/data/themes/maldives/Main.qml +index 7f1959a5f..f346829e8 100644 +--- a/data/themes/maldives/Main.qml ++++ b/data/themes/maldives/Main.qml +@@ -58,11 +58,12 @@ Rectangle { + + Background { + anchors.fill: parent +- source: config.background ++ source: Qt.resolvedUrl(config.background) + fillMode: Image.PreserveAspectCrop + onStatusChanged: { +- if (status == Image.Error && source != config.defaultBackground) { +- source = config.defaultBackground ++ var defaultBackground = Qt.resolvedUrl(config.defaultBackground) ++ if (status == Image.Error && source != defaultBackground) { ++ source = defaultBackground + } + } + } +@@ -87,7 +88,7 @@ Rectangle { + width: Math.max(320, mainColumn.implicitWidth + 50) + height: Math.max(320, mainColumn.implicitHeight + 50) + +- source: "rectangle.png" ++ source: Qt.resolvedUrl("rectangle.png") + + Column { + id: mainColumn +@@ -186,7 +187,7 @@ Rectangle { + width: parent.width; height: 30 + font.pixelSize: 14 + +- arrowIcon: "angle-down.png" ++ arrowIcon: Qt.resolvedUrl("angle-down.png") + + model: sessionModel + index: sessionModel.lastIndex +@@ -217,7 +218,7 @@ Rectangle { + width: parent.width; height: 30 + font.pixelSize: 14 + +- arrowIcon: "angle-down.png" ++ arrowIcon: Qt.resolvedUrl("angle-down.png") + + KeyNavigation.backtab: session; KeyNavigation.tab: loginButton + } +diff --git a/data/themes/maya/Main.qml b/data/themes/maya/Main.qml +index d166b718c..30bb530ca 100644 +--- a/data/themes/maya/Main.qml ++++ b/data/themes/maya/Main.qml +@@ -251,7 +251,7 @@ Rectangle { + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + +- arrowIcon: "images/ic_arrow_drop_down_white_24px.svg" ++ arrowIcon: Qt.resolvedUrl("images/ic_arrow_drop_down_white_24px.svg") + arrowColor: primaryHue3 + + KeyNavigation.tab : maya_username +@@ -296,7 +296,7 @@ Rectangle { + font.family : opensans_cond_light.name + font.pixelSize : spFontNormal + +- arrowIcon: "images/ic_arrow_drop_down_white_24px.svg" ++ arrowIcon: Qt.resolvedUrl("images/ic_arrow_drop_down_white_24px.svg") + arrowColor: primaryHue3 + + KeyNavigation.tab : maya_layout +@@ -355,7 +355,7 @@ Rectangle { + label : textConstants.shutdown + labelColor : normalText + +- icon : "images/ic_power_settings_new_white_24px.svg" ++ icon : Qt.resolvedUrl("images/ic_power_settings_new_white_24px.svg") + iconColor : accentShade + + hoverIconColor : powerColor +@@ -381,7 +381,7 @@ Rectangle { + label : textConstants.reboot + labelColor : normalText + +- icon : "images/ic_refresh_white_24px.svg" ++ icon : Qt.resolvedUrl("images/ic_refresh_white_24px.svg") + iconColor : accentLight + + hoverIconColor : rebootColor +@@ -492,7 +492,7 @@ Rectangle { + hoverColor : accentLight + textColor : normalText + +- image : "images/ic_warning_white_24px.svg" ++ image : Qt.resolvedUrl("images/ic_warning_white_24px.svg") + + tooltipEnabled : true + tooltipText : textConstants.capslockWarning +diff --git a/docs/THEMING.md b/docs/THEMING.md +index bc69be003..873172192 100644 +--- a/docs/THEMING.md ++++ b/docs/THEMING.md +@@ -8,7 +8,7 @@ We also provide models containing information about the screens, available sessi + + ComboBox { + id: session +- arrowIcon: "angle-down.png" ++ arrowIcon: Qt.resolvedPath("angle-down.png") + model: sessionModel + index: sessionModel.lastIndex + } +diff --git a/src/greeter/theme/Main.qml b/src/greeter/theme/Main.qml +index 2106f6004..b799670ac 100644 +--- a/src/greeter/theme/Main.qml ++++ b/src/greeter/theme/Main.qml +@@ -55,7 +55,7 @@ Rectangle { + + Background { + anchors.fill: parent +- source: "qrc:/theme/background.png" ++ source: "qrc:///theme/background.png" + fillMode: Image.PreserveAspectCrop + onStatusChanged: { + if (status == Image.Error && source != config.defaultBackground) { +@@ -131,7 +131,7 @@ Rectangle { + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.margins: 10 +- source: "angle-left.png" ++ source: "qrc:///theme/angle-left.png" + onClicked: listView.decrementCurrentIndex() + + KeyNavigation.backtab: btnShutdown; KeyNavigation.tab: listView +@@ -162,7 +162,7 @@ Rectangle { + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + anchors.margins: 10 +- source: "angle-right.png" ++ source: "qrc:///theme/angle-right.png" + onClicked: listView.incrementCurrentIndex() + KeyNavigation.backtab: listView; KeyNavigation.tab: session + } +@@ -222,7 +222,7 @@ Rectangle { + width: 245 + anchors.verticalCenter: parent.verticalCenter + +- arrowIcon: "angle-down.png" ++ arrowIcon: "qrc:///theme/angle-down.png" + + model: sessionModel + index: sessionModel.lastIndex +@@ -251,7 +251,7 @@ Rectangle { + + visible: keyboard.enabled && keyboard.layouts.length > 0 + +- arrowIcon: "angle-down.png" ++ arrowIcon: "qrc:///theme/angle-down.png" + + KeyNavigation.backtab: session; KeyNavigation.tab: btnShutdown + } +@@ -266,7 +266,7 @@ Rectangle { + ImageButton { + id: btnReboot + height: parent.height +- source: "reboot.png" ++ source: "qrc:///theme/reboot.png" + + visible: sddm.canReboot + +@@ -278,7 +278,7 @@ Rectangle { + ImageButton { + id: btnShutdown + height: parent.height +- source: "shutdown.png" ++ source: "qrc:///theme/shutdown.png" + + visible: sddm.canPowerOff + + +From fb6849312dd5eddf312b7bdb660162f23a2bdab8 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Mon, 26 Feb 2024 19:39:53 -0800 +Subject: [PATCH 4/7] Components: use Transitions instead of Behaviors + +It's not recommended[^1] to use Behaviors with States, but the specific +examples in SDDM weren't causing any problems previously (on Qt5). + +Now, with Qt6 support, we can finally observe the promised bugs from the +referenced article in the wild: + +* ComboBox can be closed only once. On a second activation it stays open +* Button color transitions on focus out are abruptly stopped on a wrong + color +* ... (this is where I noticed a pattern and decided to convert + everything else preemptively). + +This commit essentially reverts 930fa07bf24d391d42abcfb981f145117292d49d + +[^1]: https://doc.qt.io/qt-5/qtquick-statesanimations-behaviors.html +--- + components/2.0/Button.qml | 4 +++- + components/2.0/ComboBox.qml | 12 ++++++++---- + components/2.0/ImageButton.qml | 4 +++- + components/2.0/Menu.qml | 6 ++++-- + components/2.0/PictureBox.qml | 6 ++++-- + components/2.0/TextBox.qml | 6 ++++-- + 6 files changed, 26 insertions(+), 12 deletions(-) + +diff --git a/components/2.0/Button.qml b/components/2.0/Button.qml +index cedc8356e..7c74f1ded 100644 +--- a/components/2.0/Button.qml ++++ b/components/2.0/Button.qml +@@ -67,7 +67,9 @@ Rectangle { + } + ] + +- Behavior on color { NumberAnimation { duration: 200 } } ++ transitions: Transition { ++ ColorAnimation { duration: 200 } ++ } + + clip: true + smooth: true +diff --git a/components/2.0/ComboBox.qml b/components/2.0/ComboBox.qml +index 26bbef35e..e7fdb3362 100644 +--- a/components/2.0/ComboBox.qml ++++ b/components/2.0/ComboBox.qml +@@ -70,8 +70,6 @@ FocusScope { + border.color: container.borderColor + border.width: container.borderWidth + +- Behavior on border.color { ColorAnimation { duration: 100 } } +- + states: [ + State { + name: "hover"; when: mouseArea.containsMouse +@@ -82,6 +80,10 @@ FocusScope { + PropertyChanges { target: main; border.width: container.borderWidth; border.color: container.focusColor } + } + ] ++ ++ transitions: Transition { ++ ColorAnimation { property: "border.color"; duration: 100 } ++ } + } + + Loader { +@@ -157,8 +159,6 @@ FocusScope { + + clip: true + +- Behavior on height { NumberAnimation { duration: 100 } } +- + Component { + id: myDelegate + +@@ -214,6 +214,10 @@ FocusScope { + PropertyChanges { target: dropDown; height: (container.height - 2*container.borderWidth) * listView.count + container.borderWidth} + } + ] ++ ++ transitions: Transition { ++ NumberAnimation { property: "height"; duration: 100 } ++ } + } + + function toggle() { +diff --git a/components/2.0/ImageButton.qml b/components/2.0/ImageButton.qml +index 6277148ab..28bc940be 100644 +--- a/components/2.0/ImageButton.qml ++++ b/components/2.0/ImageButton.qml +@@ -53,7 +53,9 @@ Image { + } + ] + +- Behavior on opacity { NumberAnimation { duration: 200 } } ++ transitions: Transition { ++ NumberAnimation { property: "opacity"; duration: 200 } ++ } + + clip: true + smooth: true +diff --git a/components/2.0/Menu.qml b/components/2.0/Menu.qml +index 8ef29841e..9acecb9e2 100644 +--- a/components/2.0/Menu.qml ++++ b/components/2.0/Menu.qml +@@ -34,8 +34,6 @@ Rectangle { + property alias model: menuList.model + property alias index: menuList.currentIndex + +- Behavior on height { NumberAnimation { duration: 100 } } +- + states: [ + State { + name: "visible"; +@@ -43,6 +41,10 @@ Rectangle { + } + ] + ++ transitions: Transition { ++ NumberAnimation { property: "height"; duration: 100 } ++ } ++ + Component { + id: listViewItem + +diff --git a/components/2.0/PictureBox.qml b/components/2.0/PictureBox.qml +index eb2fbfee8..b9571f04e 100644 +--- a/components/2.0/PictureBox.qml ++++ b/components/2.0/PictureBox.qml +@@ -37,8 +37,6 @@ FocusScope { + + signal login() + +- Behavior on height { NumberAnimation { duration: 100 } } +- + states: [ + State { + name: "" +@@ -50,6 +48,10 @@ FocusScope { + } + ] + ++ transitions: Transition { ++ NumberAnimation { property: "height"; duration: 100 } ++ } ++ + Rectangle { + id: shadow + anchors.fill: parent +diff --git a/components/2.0/TextBox.qml b/components/2.0/TextBox.qml +index a8d89afd5..0db8ce885 100644 +--- a/components/2.0/TextBox.qml ++++ b/components/2.0/TextBox.qml +@@ -47,8 +47,6 @@ FocusScope { + border.color: container.borderColor + border.width: 1 + +- Behavior on border.color { ColorAnimation { duration: 100 } } +- + states: [ + State { + name: "hover"; when: mouseArea.containsMouse +@@ -59,6 +57,10 @@ FocusScope { + PropertyChanges { target: main; border.width: 1; border.color: container.focusColor } + } + ] ++ ++ transitions: Transition { ++ ColorAnimation { duration: 100 } ++ } + } + + MouseArea { + +From 5c9a8b7d479f8bf019c5fa1a5d9a78ca12db5793 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Mon, 26 Feb 2024 21:11:01 -0800 +Subject: [PATCH 5/7] Themes: fix deprecated signal handler declarations + +Fixes following warnings: +``` +QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } +Parameter "event" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. +``` +--- + components/2.0/Button.qml | 4 ++-- + components/2.0/ComboBox.qml | 2 +- + components/2.0/ImageButton.qml | 4 ++-- + components/2.0/LayoutBox.qml | 8 ++++++-- + components/2.0/PictureBox.qml | 2 +- + data/themes/elarun/Main.qml | 8 ++++---- + data/themes/maldives/Main.qml | 11 +++++------ + data/themes/maya/Main.qml | 10 +++++----- + src/greeter/theme/Main.qml | 6 +++--- + 9 files changed, 29 insertions(+), 26 deletions(-) + +diff --git a/components/2.0/Button.qml b/components/2.0/Button.qml +index 7c74f1ded..4d6d40a76 100644 +--- a/components/2.0/Button.qml ++++ b/components/2.0/Button.qml +@@ -111,7 +111,7 @@ Rectangle { + onReleased: { container.focus = true; container.released() } + } + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Space) { + container.spaceDown = true; + container.pressed() +@@ -122,7 +122,7 @@ Rectangle { + } + } + +- Keys.onReleased: { ++ Keys.onReleased: function (event) { + if (event.key === Qt.Key_Space) { + container.spaceDown = false; + container.released() +diff --git a/components/2.0/ComboBox.qml b/components/2.0/ComboBox.qml +index e7fdb3362..997a3886e 100644 +--- a/components/2.0/ComboBox.qml ++++ b/components/2.0/ComboBox.qml +@@ -134,7 +134,7 @@ FocusScope { + } + } + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Up) { + listView.decrementCurrentIndex() + } else if (event.key === Qt.Key_Down) { +diff --git a/components/2.0/ImageButton.qml b/components/2.0/ImageButton.qml +index 28bc940be..b2c267d2b 100644 +--- a/components/2.0/ImageButton.qml ++++ b/components/2.0/ImageButton.qml +@@ -77,7 +77,7 @@ Image { + onReleased: { container.focus = true; container.released() } + } + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Space) { + container.spaceDown = true; + container.pressed() +@@ -88,7 +88,7 @@ Image { + } + } + +- Keys.onReleased: { ++ Keys.onReleased: function (event) { + if (event.key === Qt.Key_Space) { + container.spaceDown = false; + container.released() +diff --git a/components/2.0/LayoutBox.qml b/components/2.0/LayoutBox.qml +index b992f28de..5e62acd3f 100644 +--- a/components/2.0/LayoutBox.qml ++++ b/components/2.0/LayoutBox.qml +@@ -30,12 +30,16 @@ ComboBox { + model: keyboard.layouts + index: keyboard.currentLayout + +- onValueChanged: keyboard.currentLayout = id ++ function onValueChanged(id) { ++ keyboard.currentLayout = id ++ } + + Connections { + target: keyboard + +- onCurrentLayoutChanged: combo.index = keyboard.currentLayout ++ function onCurrentLayoutChanged() { ++ combo.index = keyboard.currentLayout ++ } + } + + rowDelegate: Rectangle { +diff --git a/components/2.0/PictureBox.qml b/components/2.0/PictureBox.qml +index b9571f04e..560556e40 100644 +--- a/components/2.0/PictureBox.qml ++++ b/components/2.0/PictureBox.qml +@@ -105,7 +105,7 @@ FocusScope { + focus: true + visible: showPassword + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + container.login(); + event.accepted = true +diff --git a/data/themes/elarun/Main.qml b/data/themes/elarun/Main.qml +index 8151bb52a..d0caadaea 100644 +--- a/data/themes/elarun/Main.qml ++++ b/data/themes/elarun/Main.qml +@@ -39,11 +39,11 @@ Rectangle { + + Connections { + target: sddm +- onLoginSucceeded: { ++ function onLoginSucceeded() { + } +- onInformationMessage: { ++ function onInformationMessage(message) { + } +- onLoginFailed: { ++ function onLoginFailed() { + pw_entry.text = "" + } + } +@@ -135,7 +135,7 @@ Rectangle { + + KeyNavigation.backtab: user_entry; KeyNavigation.tab: login_button + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(user_entry.text, pw_entry.text, sessionIndex) + event.accepted = true +diff --git a/data/themes/maldives/Main.qml b/data/themes/maldives/Main.qml +index f346829e8..17b1b8aff 100644 +--- a/data/themes/maldives/Main.qml ++++ b/data/themes/maldives/Main.qml +@@ -40,17 +40,16 @@ Rectangle { + Connections { + target: sddm + +- onLoginSucceeded: { ++ function onLoginSucceeded() { + errorMessage.color = "steelblue" + errorMessage.text = textConstants.loginSucceeded + } +- +- onLoginFailed: { ++ function onLoginFailed() { + password.text = "" + errorMessage.color = "red" + errorMessage.text = textConstants.loginFailed + } +- onInformationMessage: { ++ function onInformationMessage(message) { + errorMessage.color = "red" + errorMessage.text = message + } +@@ -126,7 +125,7 @@ Rectangle { + + KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, sessionIndex) + event.accepted = true +@@ -153,7 +152,7 @@ Rectangle { + + KeyNavigation.backtab: name; KeyNavigation.tab: session + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(name.text, password.text, sessionIndex) + event.accepted = true +diff --git a/data/themes/maya/Main.qml b/data/themes/maya/Main.qml +index 30bb530ca..60473a473 100644 +--- a/data/themes/maya/Main.qml ++++ b/data/themes/maya/Main.qml +@@ -75,7 +75,7 @@ Rectangle { + Connections { + target: sddm + +- onLoginSucceeded: { ++ function onLoginSucceeded() { + prompt_bg.color = successText + prompt_txt.text = textConstants.loginSucceeded + +@@ -84,7 +84,7 @@ Rectangle { + + anim_success.start() + } +- onLoginFailed: { ++ function onLoginFailed() { + prompt_bg.color = failureText + prompt_txt.text = textConstants.loginFailed + +@@ -93,7 +93,7 @@ Rectangle { + + anim_failure.start() + } +- onInformationMessage: { ++ function onInformationMessage(message) { + prompt_bg.color = failureText + prompt_txt.text = message + +@@ -505,7 +505,7 @@ Rectangle { + KeyNavigation.tab : maya_login + KeyNavigation.backtab : maya_username + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if ((event.key === Qt.Key_Return) || (event.key === Qt.Key_Enter)) { + maya_root.tryLogin() + +@@ -546,7 +546,7 @@ Rectangle { + + onClicked: maya_root.tryLogin() + +- Keys.onPressed: { ++ Keys.onPressed: function (event) { + if ((event.key === Qt.Key_Return) || (event.key === Qt.Key_Enter)) { + maya_root.tryLogin() + +diff --git a/src/greeter/theme/Main.qml b/src/greeter/theme/Main.qml +index b799670ac..257153b16 100644 +--- a/src/greeter/theme/Main.qml ++++ b/src/greeter/theme/Main.qml +@@ -40,15 +40,15 @@ Rectangle { + + Connections { + target: sddm +- onLoginSucceeded: { ++ function onLoginSucceeded() { + } + +- onLoginFailed: { ++ function onLoginFailed() { + txtMessage.text = textConstants.loginFailed + listView.currentItem.password = "" + } + +- onInformationMessage: { ++ function onInformationMessage(message) { + txtMessage.text = message + } + } + +From ae6313e7433acff4e8bbbfd431a44d715cb306a9 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Tue, 27 Feb 2024 00:00:04 -0800 +Subject: [PATCH 6/7] Themes: set QtVersion=@QT_MAJOR_VERSION@ + +--- + data/themes/CMakeLists.txt | 12 +++++++++--- + .../elarun/{metadata.desktop => metadata.desktop.in} | 2 +- + .../{metadata.desktop => metadata.desktop.in} | 1 + + .../maya/{metadata.desktop => metadata.desktop.in} | 1 + + src/greeter/CMakeLists.txt | 1 + + src/greeter/theme.qrc | 2 +- + .../theme/{metadata.desktop => metadata.desktop.in} | 1 + + 7 files changed, 15 insertions(+), 5 deletions(-) + rename data/themes/elarun/{metadata.desktop => metadata.desktop.in} (97%) + rename data/themes/maldives/{metadata.desktop => metadata.desktop.in} (92%) + rename data/themes/maya/{metadata.desktop => metadata.desktop.in} (92%) + rename src/greeter/theme/{metadata.desktop => metadata.desktop.in} (92%) + +diff --git a/data/themes/CMakeLists.txt b/data/themes/CMakeLists.txt +index 60b29be2e..a18fe8926 100644 +--- a/data/themes/CMakeLists.txt ++++ b/data/themes/CMakeLists.txt +@@ -10,9 +10,15 @@ foreach(THEME ${THEMES}) + + qt_add_translation(QM_FILES "${TRANSLATION_SOURCES}") + +- install(DIRECTORY "${THEME}" DESTINATION "${DATA_INSTALL_DIR}/themes" PATTERN "${THEME}/*.ts" +- EXCLUDE PATTERN "${THEME}/.gitattributes" +- EXCLUDE) ++ configure_file("${THEME}/metadata.desktop.in" "${THEME}/metadata.desktop" @ONLY) ++ ++ install(DIRECTORY "${THEME}" DESTINATION "${DATA_INSTALL_DIR}/themes" ++ PATTERN "${THEME}/*.in" EXCLUDE ++ PATTERN "${THEME}/*.ts" EXCLUDE ++ PATTERN "${THEME}/.gitattributes" EXCLUDE) ++ ++ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${THEME}/metadata.desktop" ++ DESTINATION "${DATA_INSTALL_DIR}/themes/${THEME}/") + + list(APPEND THEMES_QM_FILES ${QM_FILES}) + endforeach(THEME) +diff --git a/data/themes/elarun/metadata.desktop b/data/themes/elarun/metadata.desktop.in +similarity index 97% +rename from data/themes/elarun/metadata.desktop +rename to data/themes/elarun/metadata.desktop.in +index 50455880a..a992a6102 100644 +--- a/data/themes/elarun/metadata.desktop ++++ b/data/themes/elarun/metadata.desktop.in +@@ -46,4 +46,4 @@ TranslationsDirectory=translations + Theme-Id=elarun + Theme-API=2.0 + Website=https://github.com/sddm/sddm +- ++QtVersion=@QT_MAJOR_VERSION@ +diff --git a/data/themes/maldives/metadata.desktop b/data/themes/maldives/metadata.desktop.in +similarity index 92% +rename from data/themes/maldives/metadata.desktop +rename to data/themes/maldives/metadata.desktop.in +index acd0fa47d..8931da6cd 100644 +--- a/data/themes/maldives/metadata.desktop ++++ b/data/themes/maldives/metadata.desktop.in +@@ -14,3 +14,4 @@ TranslationsDirectory=translations + Email=abdurrahmanavci@gmail.com + Theme-Id=maldives + Theme-API=2.0 ++QtVersion=@QT_MAJOR_VERSION@ +diff --git a/data/themes/maya/metadata.desktop b/data/themes/maya/metadata.desktop.in +similarity index 92% +rename from data/themes/maya/metadata.desktop +rename to data/themes/maya/metadata.desktop.in +index 0c2ab2623..ccda38bfb 100644 +--- a/data/themes/maya/metadata.desktop ++++ b/data/themes/maya/metadata.desktop.in +@@ -14,3 +14,4 @@ TranslationsDirectory=translations + Email=spremi@ymail.com + Theme-Id=maya + Theme-API=2.0 ++QtVersion=@QT_MAJOR_VERSION@ +diff --git a/src/greeter/CMakeLists.txt b/src/greeter/CMakeLists.txt +index 72769e4d0..b9159c53d 100644 +--- a/src/greeter/CMakeLists.txt ++++ b/src/greeter/CMakeLists.txt +@@ -36,6 +36,7 @@ set(GREETER_SOURCES + ) + + configure_file("theme.qrc" "theme.qrc") ++configure_file("theme/metadata.desktop.in" "theme/metadata.desktop" @ONLY) + + qt_add_resources(RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/theme.qrc) + +diff --git a/src/greeter/theme.qrc b/src/greeter/theme.qrc +index efed01179..299169ec1 100644 +--- a/src/greeter/theme.qrc ++++ b/src/greeter/theme.qrc +@@ -7,7 +7,7 @@ + ${CMAKE_CURRENT_SOURCE_DIR}/theme/Main.qml + ${CMAKE_CURRENT_SOURCE_DIR}/theme/reboot.png + ${CMAKE_CURRENT_SOURCE_DIR}/theme/shutdown.png +- ${CMAKE_CURRENT_SOURCE_DIR}/theme/metadata.desktop ++ ${CMAKE_CURRENT_BINARY_DIR}/theme/metadata.desktop + ${CMAKE_CURRENT_SOURCE_DIR}/theme/theme.conf + + +diff --git a/src/greeter/theme/metadata.desktop b/src/greeter/theme/metadata.desktop.in +similarity index 92% +rename from src/greeter/theme/metadata.desktop +rename to src/greeter/theme/metadata.desktop.in +index a1c22ce93..0a4c9f349 100644 +--- a/src/greeter/theme/metadata.desktop ++++ b/src/greeter/theme/metadata.desktop.in +@@ -14,3 +14,4 @@ TranslationsDirectory=translations + Email=abdurrahmanavci@gmail.com + Theme-Id=maui + Theme-API=2.0 ++QtVersion=@QT_MAJOR_VERSION@ + +From ed30ef9f3897dd14ef1d7d04674166171f646fce Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Tue, 27 Feb 2024 07:07:26 -0800 +Subject: [PATCH 7/7] Docs: add QtVersion information to THEMING + +--- + docs/THEMING.md | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/docs/THEMING.md b/docs/THEMING.md +index 873172192..69997e88a 100644 +--- a/docs/THEMING.md ++++ b/docs/THEMING.md +@@ -13,6 +13,8 @@ We also provide models containing information about the screens, available sessi + index: sessionModel.lastIndex + } + ++Themes are run by a Qt 5 built sddm-greeter, unless the `QtVersion` property in metadata.desktop specifies a different version, such as `QtVersion=6` for using `sddm-greeter-qt6`. ++ + ## Proxy Object + + We provide a proxy object, called as `sddm` to the themes as a context property. This object holds some useful properties about the host system. It also acts as a proxy between the greeter and the daemon. All of the methods called on this object will be transferred to the daemon through a local socket to be executed there. diff --git a/s/sddm/stone.yaml b/s/sddm/stone.yaml index 92ba3f02c..489d2994d 100644 --- a/s/sddm/stone.yaml +++ b/s/sddm/stone.yaml @@ -5,7 +5,7 @@ # name : sddm version : 0.21.0 -release : 1 +release : 2 homepage : https://github.com/sddm/sddm upstreams : - https://github.com/sddm/sddm/archive/refs/tags/v0.21.0.tar.gz : f895de2683627e969e4849dbfbbb2b500787481ca5ba0de6d6dfdae5f1549abf @@ -16,27 +16,34 @@ description : | animated user interfaces. license : GPL-2.0-only builddeps : - - cmake(Qt5LinguistTools) - - pkgconfig(Qt5Core) - - pkgconfig(Qt5Qml) + - cmake(Qt6LinguistTools) + - pkgconfig(Qt6Core) + - pkgconfig(Qt6Qml) - pkgconfig(gl) - pkgconfig(libsystemd) - pkgconfig(pam) - pkgconfig(xau) - pkgconfig(xcb) +rundeps : + - qt6-wayland setup : | %patch %(pkgdir)/dont-error-for-logindef.patch - %cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBEXECDIR=%(libdir)/sddm \ - -DDBUS_CONFIG_DIR=%(datadir)/dbus-1/system.d \ - -DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \ - -DBUILD_MAN_PAGES=OFF \ - -DUID_MAX=60513 + %patch %(pkgdir)/make-qt6-themes-default.patch + %patch %(pkgdir)/qt6-themes.patch + %cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBEXECDIR=%(libdir)/sddm \ + -DDBUS_CONFIG_DIR=%(datadir)/dbus-1/system.d \ + -DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \ + -DBUILD_MAN_PAGES=OFF \ + -DBUILD_WITH_QT6=ON \ + -DUID_MAX=60513 build : | %cmake_build install : | %cmake_install + %qml_cache_qt6 + %install_file %(pkgdir)/sddm.group %(installroot)%(libdir)/userdb/sddm.group ln -s sddm.group %(installroot)%(libdir)/userdb/953.group %install_file %(pkgdir)/sddm.user %(installroot)%(libdir)/userdb/sddm.user