From 79798d57e76a4bc6b046622bc0a96ca6d8e6eec7 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Mon, 5 Dec 2022 11:12:45 -0500 Subject: [PATCH] actiondrawer: Introduce fix for black text even when opacity is 0 --- .../qml/actiondrawer/LandscapeContentContainer.qml | 12 ++++++++++++ .../qml/actiondrawer/PortraitContentContainer.qml | 3 +++ 2 files changed, 15 insertions(+) diff --git a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml index a09107f4..54183d06 100644 --- a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml @@ -69,6 +69,9 @@ PlasmaCore.ColorScope { opacity: opacityValue spacing: 0 + // HACK: there are weird issues with text rendering black regardless of opacity, just set the text to be invisible once it's out + visible: opacity > 0.05 + anchors { top: mediaWidget.bottom topMargin: 0 @@ -111,6 +114,9 @@ PlasmaCore.ColorScope { verticalAlignment: Qt.AlignVCenter opacity: columnLayout.opacity + // HACK: there are weird issues with text rendering black regardless of opacity, just set the text to be invisible once it's out + visible: opacity > 0.05 + anchors { left: parent.left top: parent.top @@ -129,6 +135,9 @@ PlasmaCore.ColorScope { verticalAlignment: Qt.AlignTop color: PlasmaCore.ColorScope.disabledTextColor opacity: columnLayout.opacity + + // HACK: there are weird issues with text rendering black regardless of opacity, just set the text to be invisible once it's out + visible: opacity > 0.05 anchors { left: parent.left @@ -149,6 +158,9 @@ PlasmaCore.ColorScope { y: isOnLargeScreen ? date.y - height + date.implicitHeight : date.y + date.implicitHeight + columnLayout.anchors.margins / 2 opacity: columnLayout.opacity + + // HACK: there are weird issues with text rendering black regardless of opacity, just set the text to be invisible once it's out + visible: opacity > 0.05 anchors { right: quickSettings.left diff --git a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml b/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml index 6e58039a..bbcd8f08 100644 --- a/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/PortraitContentContainer.qml @@ -120,5 +120,8 @@ PlasmaCore.ColorScope { right: parent.right } opacity: applyMinMax(root.actionDrawer.offset / root.minimizedQuickSettingsOffset) + + // HACK: there are weird issues with text rendering black regardless of opacity, just set the text to be invisible once it's out + visible: opacity > 0.05 } }