[plasma/union/Plasma/6.7] src/output/qtquick/style: output/quick: Handle some more undefined values in MenuItem

Arjen Hiemstra <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit e6a74761fb8a428d45386a8443b0aaaa43133cb2 by Arjen Hiemstra.
Committed on 17/07/2026 at 11:26.
Pushed by ahiemstra into branch 'Plasma/6.7'.

output/quick: Handle some more undefined values in MenuItem


(cherry picked from commit 52cf5f6950559ba5c35125977f7c0a1d36e0a545)

Co-authored-by: Arjen Hiemstra <[email protected]>

M  +3    -3    src/output/qtquick/style/MenuItem.qml

https://invent.kde.org/plasma/union/-/commit/e6a74761fb8a428d45386a8443b0aaaa43133cb2

diff --git a/src/output/qtquick/style/MenuItem.qml b/src/output/qtquick/style/MenuItem.qml
index d227839a..a7c5b871 100644
--- a/src/output/qtquick/style/MenuItem.qml
+++ b/src/output/qtquick/style/MenuItem.qml
@@ -106,7 +106,7 @@ T.MenuItem {
 
             text: control.Union.Mnemonics.richTextLabel ?? control.text
             font: control.font
-            color: Union.Style.properties.text.color
+            color: Union.Style.properties.text.color ?? control.palette.text
             elide: Text.ElideRight
 
             horizontalAlignment: Text.AlignLeft
@@ -125,7 +125,7 @@ T.MenuItem {
                 highlighted: control.highlighted
             }
 
-            readonly property real spacing: Union.Style.properties.layout.spacing
+            readonly property real spacing: Union.Style.properties.layout.spacing ?? 0.0
 
             anchors {
                 fill: parent
@@ -140,7 +140,7 @@ T.MenuItem {
 
             text: visible ? itemShortcut.nativeText : ""
             font: control.font
-            color: Union.Style.properties.text.color
+            color: Union.Style.properties.text.color ?? control.palette.text
             horizontalAlignment: Text.AlignRight
             verticalAlignment: Text.AlignVCenter
             visible: control.action && control.action.shortcut !== undefined
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.