Bug 497054

Summary: TextColor does not reliably propagate after opacity and visible animation
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Kai Uwe Broulik <kde>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: john.kizer, notmart
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kai Uwe Broulik 2024-12-04 21:03:19 UTC
SUMMARY
I have found this very peculiar setup that leads to the lock screen password field not having a visible reveal password button. The button is there but its color is wrong (white on white) until something (e.g. it being disabled after typing a wrong password) causes it to update

STEPS TO REPRODUCE
1. Lock the screen with Breeze light

OBSERVED RESULT
No “reveal password” button

EXPECTED RESULT
There is a “reveal password” button

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: git master as of 2024-12-04
Qt Version: 6.8.0

ADDITIONAL INFORMATION
I managed to reproduce the situation the lock screen does using the following QML snippet:
run it using the “qml” tool, observe how the reveal password button is invisible. I have no idea where this goes wrong.
The Repeater {} in the ActionTextfield also has something to do with it (parent change not being noticed by the theme inheritance mechanism?). I found that Kirigami.Theme.textColor is actually wrong inside the icon. So it’s not the icon, it’s the color propagation. I have no idea what’s going on …

import QtQuick
import org.kde.kirigami as Kirigami
import org.kde.plasma.extras as PlasmaExtras

Item {
    Kirigami.Theme.inherit: false
    Kirigami.Theme.colorSet: Kirigami.Theme.Complementary

    PropertyAnimation {
        target: pw
        property: "opacity"
        from: 0
        to: 1
        duration: 1
        running: true
    }

    PlasmaExtras.PasswordField {
        id: pw
        visible: opacity > 0
    }
}
Comment 1 John Kizer 2024-12-15 08:24:42 UTC
I can reproduce this on Fedora KDE 41.