Backport sddm theme improvements to fix visual bugs (#2054016, #2058468)

Also, correctly set distro logo for fedora breeze sddm theme.
epel9
Neal Gompa 3 years ago
parent 1857efd537
commit 0363a0be56

1
.gitignore vendored

@ -73,3 +73,4 @@
/plasma-workspace-5.24.0.tar.xz
/plasma-workspace-5.24.1.tar.xz
/plasma-workspace-5.24.2.tar.xz
/sddm-theme-5.24.80~pre.tar.gz

@ -0,0 +1,173 @@
From 119195493cf2492ddc35fbbc4d97266ceee16ad1 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Sat, 5 Mar 2022 19:48:56 +0100
Subject: [PATCH] Port SDDM theme to PlasmaComponents 3.0
Uses a combobox instead of a menu + button
---
sddm-theme/BreezeMenuStyle.qml | 25 ------------------
sddm-theme/KeyboardButton.qml | 47 ++++++++++++----------------------
sddm-theme/Main.qml | 1 -
sddm-theme/SessionButton.qml | 37 +++++++-------------------
4 files changed, 26 insertions(+), 84 deletions(-)
delete mode 100644 sddm-theme/BreezeMenuStyle.qml
diff --git a/sddm-theme/BreezeMenuStyle.qml b/sddm-theme/BreezeMenuStyle.qml
deleted file mode 100644
index e4a91d4d6..000000000
--- a/sddm-theme/BreezeMenuStyle.qml
+++ /dev/null
@@ -1,25 +0,0 @@
-import QtQuick 2.15
-// Don't bump them any further, these are the latest.
-import QtQuick.Controls 1.6 as QQC
-import QtQuick.Controls.Styles 1.4 as QQCS
-
-import org.kde.plasma.core 2.0 as PlasmaCore
-
-QQCS.MenuStyle {
- frame: Rectangle {
- color: PlasmaCore.ColorScope.backgroundColor
- border.color: Qt.tint(PlasmaCore.ColorScope.textColor, Qt.rgba(color.r, color.g, color.b, 0.7))
- border.width: 1
- }
- itemDelegate.label: QQC.Label {
- height: contentHeight * 1.2
- verticalAlignment: Text.AlignVCenter
- color: styleData.selected ? PlasmaCore.ColorScope.highlightedTextColor : PlasmaCore.ColorScope.textColor
- font.pointSize: config.fontSize
- text: styleData.text
- }
- itemDelegate.background: Rectangle {
- visible: styleData.selected
- color: PlasmaCore.ColorScope.highlightColor
- }
-}
diff --git a/sddm-theme/KeyboardButton.qml b/sddm-theme/KeyboardButton.qml
index 6ebf0d5bb..a95884d04 100644
--- a/sddm-theme/KeyboardButton.qml
+++ b/sddm-theme/KeyboardButton.qml
@@ -1,38 +1,25 @@
-import QtQuick 2.15
-import QtQuick.Controls 1.6 as QQC // Don't bump it any further, this is the latest.
+/*
+ SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
-import org.kde.plasma.core 2.0 as PlasmaCore
-import org.kde.plasma.components 2.0 as PlasmaComponents // Because PC3 ToolButton can't take a menu
+ SPDX-License-Identifier: LGPL-2.0-or-later
+*/
-PlasmaComponents.ToolButton {
- id: keyboardButton
+import QtQuick 2.15
- property int currentIndex: -1
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 3.0 as PlasmaComponents
- text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName)
- implicitWidth: minimumWidth
+PlasmaComponents.ComboBox {
+ id: root
- visible: menu.items.length > 1
+ PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
+ PlasmaCore.ColorScope.inherit: false
- Component.onCompleted: {
- currentIndex = Qt.binding(() => keyboard.currentLayout);
- }
+ currentIndex: keyboard.currentLayout
+ onCurrentIndexChanged: keyboard.currentLayout = currentIndex
- menu: QQC.Menu {
- id: keyboardMenu
- style: BreezeMenuStyle {}
- Instantiator {
- id: instantiator
- model: keyboard.layouts
- onObjectAdded: keyboardMenu.insertItem(index, object)
- onObjectRemoved: keyboardMenu.removeItem(object)
- delegate: QQC.MenuItem {
- text: modelData.longName
- property string shortName: modelData.shortName
- onTriggered: {
- keyboard.currentLayout = model.index
- }
- }
- }
- }
+ visible: count > 1
+ textRole: "longName"
+ model: keyboard.layouts
+ displayText: currentText.length === 0 ? "" : i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", currentText)
}
diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml
index 0d6b66e77..690c132e3 100644
--- a/sddm-theme/Main.qml
+++ b/sddm-theme/Main.qml
@@ -6,7 +6,6 @@
import QtQuick 2.15
import QtQuick.Layouts 1.15
-import QtQuick.Controls 1.6 // Don't bump it any further, this is the latest.
import QtQuick.Controls 2.15 as QQC2
import QtGraphicalEffects 1.15
diff --git a/sddm-theme/SessionButton.qml b/sddm-theme/SessionButton.qml
index 6934abda7..ed6ef96c2 100644
--- a/sddm-theme/SessionButton.qml
+++ b/sddm-theme/SessionButton.qml
@@ -5,39 +5,20 @@
*/
import QtQuick 2.15
-import QtQuick.Controls 1.6 as QQC // Don't bump it any further, this is the latest.
import org.kde.plasma.core 2.0 as PlasmaCore
-import org.kde.plasma.components 2.0 as PlasmaComponents // Because PC3 ToolButton can't take a menu
+import org.kde.plasma.components 3.0 as PlasmaComponents
-PlasmaComponents.ToolButton {
+PlasmaComponents.ComboBox {
id: root
- property int currentIndex: -1
- implicitWidth: minimumWidth
+ PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
+ PlasmaCore.ColorScope.inherit: false
- visible: menu.items.length > 1
+ currentIndex: sessionModel.lastIndex
- text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Desktop Session: %1", instantiator.objectAt(currentIndex).text || "")
-
- Component.onCompleted: {
- currentIndex = sessionModel.lastIndex
- }
-
- menu: QQC.Menu {
- id: menu
- style: BreezeMenuStyle {}
- Instantiator {
- id: instantiator
- model: sessionModel
- onObjectAdded: menu.insertItem(index, object)
- onObjectRemoved: menu.removeItem( object )
- delegate: QQC.MenuItem {
- text: model.name
- onTriggered: {
- root.currentIndex = model.index
- }
- }
- }
- }
+ visible: count > 1
+ model: sessionModel
+ textRole: "name"
+ displayText: currentText.length === 0 ? "" : i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Desktop Session: %1", currentText)
}
--
GitLab

@ -0,0 +1,28 @@
From b1b5877de0231f77f98475daabdb89a57351e4a2 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Sun, 6 Mar 2022 03:05:14 +0100
Subject: [PATCH] sddm/lockscreen: Fix weird behaviour
Only make space for the virtual keyboard when it's visible.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2058468
---
lookandfeel/contents/components/VirtualKeyboard_wayland.qml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lookandfeel/contents/components/VirtualKeyboard_wayland.qml b/lookandfeel/contents/components/VirtualKeyboard_wayland.qml
index 42895e2d9..b472fd529 100644
--- a/lookandfeel/contents/components/VirtualKeyboard_wayland.qml
+++ b/lookandfeel/contents/components/VirtualKeyboard_wayland.qml
@@ -10,7 +10,7 @@ import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards
Item {
id: inputPanel
- readonly property bool active: Qt.inputMethod.visible
+ readonly property bool active: Keyboards.KWinVirtualKeyboard.visible
property bool activated: false
visible: Qt.inputMethod.visible
--
GitLab

@ -28,7 +28,7 @@
Name: plasma-workspace
Summary: Plasma workspace, applications and applets
Version: 5.24.2
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
URL: https://invent.kde.org/plasma/%{name}
@ -52,6 +52,10 @@ Source10: kde
Source11: startkderc
Source15: fedora.desktop
# backported breeze sddm from plasma 5.24.80~pre
# lets us apply patches to fix the sddm theme
Source19: sddm-theme-5.24.80~pre.tar.gz
# breeze fedora sddm theme components
# includes f25-based preview (better than breeze or nothing at least)
Source20: breeze-fedora-0.2.tar.gz
@ -62,6 +66,14 @@ Source20: breeze-fedora-0.2.tar.gz
Source40: ssh-agent.conf
Source41: spice-vdagent.conf
## upstream Patches (master branch)
## upstreamable Patches
# From: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1508
Patch50: plasma-workspace-PR1508-sddm-theme-pc3.patch
# From: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1510
Patch51: plasma-workspace-PR1510-sddm-theme-fix-weird-behavior.patch
## downstream Patches
Patch100: plasma-workspace-konsole-in-contextmenu.patch
Patch101: plasma-workspace-5.24.0-set-fedora-default-look-and-feel.patch
@ -71,10 +83,6 @@ Patch101: plasma-workspace-5.24.0-set-fedora-default-look-and-feel.patch
# https://github.com/notmart/artwork-lnf-netrunner-core/blob/master/usr/share/plasma/look-and-feel/org.kde.netrunner-core.desktop/contents/defaults
Patch105: plasma-workspace-5.21.90-folderview_layout.patch
## upstreamable Patches
## upstream Patches (master branch)
# udev
BuildRequires: zlib-devel
BuildRequires: dbusmenu-qt5-devel
@ -462,10 +470,14 @@ BuildArch: noarch
%prep
%setup -q -a 20
%setup -q -a 19 -a 20
## upstream patches
## upstreamable patches
%patch50 -p1
%patch51 -p1
## downstream patches
%patch100 -p1 -b .konsole-in-contextmenu
# XXX: This is horribly broken and needs fixes upstream -- ngompa
@ -522,6 +534,11 @@ ln -sf %{_datadir}/backgrounds/default.png \
%{buildroot}%{_datadir}/sddm/themes/01-breeze-fedora/components/artwork/background.png
install -m644 -p breeze-fedora/* \
%{buildroot}%{_datadir}/sddm/themes/01-breeze-fedora/
%if 0%{?fedora} >= 34
# Set Fedora distro vendor logo
sed -i -e 's|^showlogo=.*$|showlogo=shown|g' %{buildroot}%{_datadir}/sddm/themes/01-breeze-fedora/theme.conf
sed -i -e 's|^logo=.*$|logo=%{_datadir}/pixmaps/fedora_whitelogo.svg|g' %{buildroot}%{_datadir}/sddm/themes/01-breeze-fedora/theme.conf
%endif
# move sddm configuration snippet to the right place
mkdir -p %{buildroot}%{_prefix}/lib/sddm
@ -785,6 +802,10 @@ desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.{klipper,
%changelog
* Sun Mar 06 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.24.2-3
- Backport sddm theme improvements to fix visual bugs (#2054016, #2058468)
- Correctly set distro logo for fedora breeze sddm theme
* Mon Feb 28 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.24.2-2
- Refresh default look-and-feel patch to fix for Plasma 5.24

@ -1,2 +1,3 @@
SHA512 (plasma-workspace-5.24.2.tar.xz) = bc33b7911447064b7a1ecb50578587d7aa5b8861962f4c69ba27ea9a66c3e11eccd4d7cd074203bbcf34821565e991d5f4292be5fe8c5b6ef09727fe2cc44d71
SHA512 (breeze-fedora-0.2.tar.gz) = ff800e686b0dcb498f321bb94d3a8274c89c092f5408ef1ec3fc65333f046aea43444144ecaf166792f807014383af87b1180dc7540905fc10dc375309f8b2a8
SHA512 (sddm-theme-5.24.80~pre.tar.gz) = 3b04c739d6054ecd9149178cafd3d7f53214a48fea834092707c5fd309018ea4986d4a955db7a2888a428c9b264e40403c36adae5f079d51979fe37912895344

@ -1 +1,2 @@
SHA512 (breeze-fedora-0.2.tar.gz) = ff800e686b0dcb498f321bb94d3a8274c89c092f5408ef1ec3fc65333f046aea43444144ecaf166792f807014383af87b1180dc7540905fc10dc375309f8b2a8
SHA512 (sddm-theme-5.24.80~pre.tar.gz) = 3b04c739d6054ecd9149178cafd3d7f53214a48fea834092707c5fd309018ea4986d4a955db7a2888a428c9b264e40403c36adae5f079d51979fe37912895344

Loading…
Cancel
Save