Possible TrayMenu text fix

This commit is contained in:
Ly-sec 2025-08-17 22:01:56 +02:00
parent 4c0ab4aec7
commit c9484d4448

View file

@ -126,7 +126,7 @@ PopupWindow {
id: text id: text
Layout.fillWidth: true Layout.fillWidth: true
color: (modelData?.enabled color: (modelData?.enabled
?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.textDisabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant
text: modelData?.text ?? "" text: modelData?.text ?? ""
font.pointSize: Style.fontSizeSmall * scaling font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@ -148,7 +148,7 @@ PopupWindow {
font.pointSize: Style.fontSizeSmall * scaling font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: modelData?.hasChildren ?? false visible: modelData?.hasChildren ?? false
color: Color.mOnSurface color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant
} }
} }
@ -350,7 +350,6 @@ PopupWindow {
color: mouseArea.containsMouse ? Color.mTertiary : Color.transparent color: mouseArea.containsMouse ? Color.mTertiary : Color.transparent
radius: Style.radiusSmall * scaling radius: Style.radiusSmall * scaling
visible: !(modelData?.isSeparator ?? false) visible: !(modelData?.isSeparator ?? false)
property color hoverTextColor: mouseArea.containsMouse ? Color.mOnSurface : Color.mOnSurface
RowLayout { RowLayout {
anchors.fill: parent anchors.fill: parent
@ -361,7 +360,7 @@ PopupWindow {
NText { NText {
id: subText id: subText
Layout.fillWidth: true Layout.fillWidth: true
color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Color.textDisabled color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant
text: modelData?.text ?? "" text: modelData?.text ?? ""
font.pointSize: Style.fontSizeSmall * scaling font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@ -383,6 +382,7 @@ PopupWindow {
font.pointSize: Style.fontSizeSmall * scaling font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
visible: modelData?.hasChildren ?? false visible: modelData?.hasChildren ?? false
color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant
} }
} }