EliverLara / Sweet-kde

Plasma desktop theme port of my Gtk theme
213 stars 21 forks source link

kscreenlocker does not show login inputs #24

Closed elerocks closed 1 year ago

elerocks commented 4 years ago

Hello, I installed "Sweet" theme via kde's "Look and feel". Two things are not working (I guess they are related): 1) when I lock my screen (using kscreenlocker, win+L on kubuntu), then no prompt for username/password is shown (also no time, no avatar, nothing). Only background image. I'm able to login only if I switch to tty (ctrl+alt+f1) and issue loginctl unlock-sessions

2) when I try to reboot/logout via the start menu (see screenshot), the screen dims, but no buttons are shown and nothing happens: image

Both issues are resolved when I switch back to Breeze in Look and feel (however I can use Sweet in "Settings -> Window decorations".

I'm also using Kvantum's Sweet theme My system: image

EliverLara commented 4 years ago

Hi, I'm guessing it's a dependency version issue, a quick fix for this is to remove the following folders from theme installation location (.local/share/plasma/look-and-feel/Sweet/contents):

Also, in order to find a more suitable solution, it would be great if you could send me the default breeze theme folder (/usr/share/plasma/look-and-fell/breeze).

elerocks commented 4 years ago

Hi Eliver, thank you, I renamed the folders and it is now OK (for anyone else looking at this solution, I had the Sweet theme installed in ~/.local/share/plasma/look-and-feel/Sweet/)

I'm attaching the whole look-and-feel folder. Before Sweet I was using theme Breeze Dark look-and-feel.zip

mhdzumair commented 3 years ago

im also have a similar issue with my debian buster. im a big fan of sweet. Previously i used sweet theme in Parrot Os that is debian testing branch. That have Qt 5.15. There is no issue with that distribution.

my problem is on debian buster (10) Qt 5.11.3 KDE plasma version 5.14.5 KDE 5.54.0

for me, I can make screen lock but I can't have an option to unlock because of QtQuick.Control 2.5 dependency. and also sddm also break and not work because of this. Thanks.

EliverLara commented 3 years ago

@mhdzumair it would be great if you could send me the default breeze theme folder (/usr/share/plasma/look-and-fell/breeze) and sddm theme (/usr/share/sddm/themes/breeze).

mhdzumair commented 3 years ago

Sure, here is the look-and-feel/breeze folder. org.kde.breeze.tar.gz here is the sddm/breeze breeze.tar.gz

And one more thing, for sddm i used whitsur-sddm that is also perfectly working.

belidzs commented 3 years ago

I experience the same issue on a fresh install of Kubuntu 20.04 LTS

When trying to log out or shutdown, the logout screen just hangs. At this point I can return to the desktop with ALT+F4.

These are the generated logs:

Apr 13 19:49:32 domper-ubuntu dbus-daemon[1132]: [session uid=1000 pid=1132] Activating service name='org.kde.LogoutPrompt' requested by ':1.256' (uid=1000 pid=8470 comm="/usr/bin/ksmserver " label="unconfined")
Apr 13 19:49:32 domper-ubuntu dbus-daemon[1132]: [session uid=1000 pid=1132] Successfully activated service 'org.kde.LogoutPrompt'
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Icon theme "gnome" not found.
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/16/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/22/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/24/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/32/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/48/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/64/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "stock" line for icon theme:  "/usr/share/icons/ubuntu-mono-dark/stock/128/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/8x8/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/16x16/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/16x16/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/22x22/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/24x24/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/24x24/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/32x32/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/32x32/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/48x48/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/48x48/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/64x64/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/64x64/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/96x96/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/96x96/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/256x256/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/512x512/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "Legacy" line for icon theme:  "/usr/share/icons/Adwaita/scalable/legacy/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Invalid Context= "UI" line for icon theme:  "/usr/share/icons/Adwaita/scalable/ui/"
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Icon theme "Mint-X" not found.
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Icon theme "elementary" not found.
Apr 13 19:49:32 domper-ubuntu org.kde.LogoutPrompt[8807]: Icon theme "gnome" not found.
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: "file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/logout/Logout.qml"
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:  "Error loading QML file.\n174: Type LogoutButton unavailable\n28: Type ActionButton unavailable\n33: Invalid alias target location: color\n"
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: kde.logout_greeter: (file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/logout/Logout.qml:174:13: Type LogoutButton unavailable
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:                 LogoutButton {
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:                 ^, file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/logout/LogoutButton.qml:28:1: Type ActionButton unavailable
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:     ActionButton {
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:     ^, file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/components/ActionButton.qml:33:34: Invalid alias target location: color
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:         property alias border_color: iconCircle.border.color
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:                                      ^)
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::logoutRequested() to KSMShutdownDlg::slotLogout()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::haltRequested() to KSMShutdownDlg::slotHalt()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::suspendRequested(int) to KSMShutdownDlg::slotSuspend(int)
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::rebootRequested() to KSMShutdownDlg::slotReboot()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::rebootRequested2(int) to KSMShutdownDlg::slotReboot(int)
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::cancelRequested() to KSMShutdownDlg::reject()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::lockScreenRequested() to KSMShutdownDlg::slotLockScreen()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: "file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/logout/Logout.qml"
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:  "Error loading QML file.\n174: Type LogoutButton unavailable\n28: Type ActionButton unavailable\n33: Invalid alias target location: color\n"
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: kde.logout_greeter: (file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/logout/Logout.qml:174:13: Type LogoutButton unavailable
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:                 LogoutButton {
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:                 ^, file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/logout/LogoutButton.qml:28:1: Type ActionButton unavailable
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:     ActionButton {
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:     ^, file:///home/belidzs/.local/share/plasma/look-and-feel/Sweet/contents/components/ActionButton.qml:33:34: Invalid alias target location: color
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:         property alias border_color: iconCircle.border.color
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]:                                      ^)
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::logoutRequested() to KSMShutdownDlg::slotLogout()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::haltRequested() to KSMShutdownDlg::slotHalt()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::suspendRequested(int) to KSMShutdownDlg::slotSuspend(int)
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::rebootRequested() to KSMShutdownDlg::slotReboot()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::rebootRequested2(int) to KSMShutdownDlg::slotReboot(int)
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::cancelRequested() to KSMShutdownDlg::reject()
Apr 13 19:49:33 domper-ubuntu org.kde.LogoutPrompt[8807]: QObject::connect: Cannot connect (null)::lockScreenRequested() to KSMShutdownDlg::slotLockScreen()
arwilczek90 commented 3 years ago

I experienced the same issue as above on kubuntu 20.04, tracked it down and changed the border_color property in ~/.local/share/plasma/look-and-feel/Sweet/contents/components/ActionButton.qml to be

33    property string border_color

and the rectangle's border.color to be

59        border.color: border_color ? border_color : "#c50ed2"

(examples may include wrong line numbers my ide tends to flatten things a bit sometimes) It may not be ideal and there are a bunch of reference errors(which are probably benign) before displaying but I can use the logout/restart/shutdown buttons now so this could be a decent work around. I saw some references in older qt docs (like the version that ships with kubuntu20.04 5.12) about not being able to alias grouped properties so thats probably what is happening. I looked through the other properties and also found a grouped property alias in ~/.local/share/plasma/look-and-feel/Sweet/contents/components/UserDelegate.qml however that one doesn't seem to be a problem in QT 5.12.

nikspyratos commented 3 years ago

Can confirm @arwilczek90's workaround, @EliverLara is it worth a PR despite the issues?

ecarlson94 commented 3 years ago

I attempted @arwilczek90's workaround with no success. This is a very serious issue that practically renders the whole theme useless (if you don't want to disable sleeping mechanisms).

It's a shame, really. I truly love this theme. I was introduced to it through Garuda. However, Garuda was riddled with bugs that were too annoying to deal with. I decided to switch to Kubuntu solely so that I could use KDE and this theme.

@EliverLara, do you need help with this issue? If so, where would you point someone new to this world of KDE theming to help debug the issue?

wouter1984 commented 3 years ago

I have the same issue in Kubuntu 20.04 and Ubuntu 20.04 (with KDE DE).

when locking there are no fields or buttons to unlock again. The system restart notifier also does not show. (The 30 seconds countdown for logout, shutdown restart).

I love sweet-dark, but the theme is just incomplete

EliverLara commented 3 years ago

@wouter1984 have you test if @arwilczek90 solution's works for you?

wouter1984 commented 3 years ago

Good Evening EliverLara,

I am very sorry for the late reply, due to migraines I haven't used my computer much at home last few days.

I can confirm that it works, after the change I have a login screen again with username, password fields and login buttons, but no matter which login screen I select in the system settings they all look the same without a background (black screen). But this is less of a problem as having no way to unlock...

I had to change lines 33 and 60 in my ActionButton.qml file, that might be it, my lines 59 and 60 are (after the change), see full file content below screenshot 33 property string border_color 59 color: "#08080C" --> This is still the original value for line 59 60 border.color: border_color ? border_color : "#c50ed2"

Screenshot_20211115_192442

/*
 *   Copyright 2016 David Edmundson <davidedmundson@kde.org>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2 or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

import QtQuick 2.8
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents

Item {
    id: root
    property alias text: label.text
    property alias iconSource: icon.source
    property alias containsMouse: mouseArea.containsMouse
    property alias font: label.font
    property alias labelRendering: label.renderType
    property alias circleOpacity: iconCircle.opacity
    property alias circleVisiblity: iconCircle.visible
    property string border_color
    property int fontSize: config.fontSize
    readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
    signal clicked

    activeFocusOnTab: true

    property int iconSize: units.gridUnit * 3

    implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth)
    implicitHeight: iconSize + units.smallSpacing + label.implicitHeight

    opacity: activeFocus || containsMouse ? 1 : 0.85
        Behavior on opacity {
            PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
                duration: units.longDuration
                easing.type: Easing.InOutQuad
            }
    }

    Rectangle {
        id: iconCircle
        anchors.centerIn: icon
        width: iconSize + units.smallSpacing
        height: width
        radius: width / 2
        color: "#08080C"
        border.color: border_color ? border_color : "#c50ed2"
        border.width: 1
        opacity: activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0)
        Behavior on opacity {
                PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
                    duration: units.longDuration
                    easing.type: Easing.InOutQuad
                }
        }
    }

    Rectangle {
        anchors.centerIn: iconCircle
        width: iconCircle.width
        height: width
        radius: width / 2
        scale: mouseArea.containsPress ? 1 : 0
        color: PlasmaCore.ColorScope.textColor
        opacity: 0.15
        Behavior on scale {
                PropertyAnimation {
                    duration: units.shortDuration
                    easing.type: Easing.InOutQuart
                }
        }
    }

    PlasmaCore.IconItem {
        id: icon
        anchors {
            top: parent.top
            horizontalCenter: parent.horizontalCenter
        }
        width: iconSize
        height: iconSize

        colorGroup: PlasmaCore.ColorScope.colorGroup
        active: mouseArea.containsMouse || root.activeFocus
    }

    PlasmaComponents.Label {
        id: label
        font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1)
        anchors {
            top: icon.bottom
            topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing
            left: parent.left
            right: parent.right
        }
        style: softwareRendering ? Text.Outline : Text.Normal
        styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignTop
        wrapMode: Text.WordWrap
        font.underline: root.activeFocus
    }

    MouseArea {
        id: mouseArea
        hoverEnabled: true
        onClicked: root.clicked()
        anchors.fill: parent
    }

    Keys.onEnterPressed: clicked()
    Keys.onReturnPressed: clicked()
    Keys.onSpacePressed: clicked()

    Accessible.onPressAction: clicked()
    Accessible.role: Accessible.Button
    Accessible.name: label.text
}`
wouter1984 commented 3 years ago

nevermind, the login screen background... Login screen and lock screen are different in KDE and had them mixed up

EliverLara commented 3 years ago

Thank you guys for testing @arwilczek90 's solution, I've adopted it as the official fix for this issue.

mathieujobin commented 2 years ago

I had Sweet theme installed for a long time, but I don't think I had any pieces active... I moved away all of my ~/.local/share/plasma/desktoptheme and ~/.local/share/plasma/look-and-feel folders away. and I am still having this issue of kscreenlocker not showing up, also #26 problem which appears highly related. I use loginctl after doing ctrl-alt-fx to unlock my sessions several times per day. it was working fine in 21.04 (Plasma 5.21), and its broken since the upgrade to 21.10 + 5.22/5.23 I will check my system wide /usr/share/plasma/ folder

mathieujobin commented 2 years ago

Ok, I removed the Sweet * themes and I still had the problem... I removed sudo apt purge qt5-style-kvantum-themes and tried materia-kde theme, strangely it fixed my issue. I tried to switch back to BreezeDark, which I thought was kind of default and well tested, and the issue came back. Very weird, but I'll stick with Materia for a while.

I realize my problem isn't related to Sweet specifically, but there isn't a ton of references on this problem on the internet. so if someone else come here, that can be helpful