TrayMenu: proper text warping + reduced each entry height for a more compact look
This commit is contained in:
parent
20b7872fad
commit
62216873be
1 changed files with 5 additions and 6 deletions
|
|
@ -15,7 +15,7 @@ PopupWindow {
|
|||
property bool isSubMenu: false
|
||||
property bool isHovered: rootMouseArea.containsMouse
|
||||
|
||||
implicitWidth: Style.baseWidgetSize * 5.625 * scaling
|
||||
implicitWidth: 200 * scaling
|
||||
|
||||
// Use the content height of the Flickable for implicit height
|
||||
implicitHeight: Math.min(Screen.height * 0.9, flickable.contentHeight + (Style.marginMedium * 2 * scaling))
|
||||
|
|
@ -117,7 +117,7 @@ PopupWindow {
|
|||
} else {
|
||||
// Calculate based on text content
|
||||
const textHeight = text.contentHeight || (Style.fontSizeReduced * scaling * 1.2)
|
||||
return Math.max(32 * scaling, textHeight + 8)
|
||||
return Math.max(28 * scaling, textHeight + (Style.marginSmall * 2 * scaling))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -146,12 +146,11 @@ PopupWindow {
|
|||
id: text
|
||||
Layout.fillWidth: true
|
||||
color: (modelData?.enabled
|
||||
?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.applyOpacity(
|
||||
Color.mOnSurface, 64)
|
||||
?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOutline
|
||||
text: modelData?.text ?? ""
|
||||
font.pointSize: Style.fontSizeReduced * scaling
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Image {
|
||||
|
|
@ -248,4 +247,4 @@ PopupWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue