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 isSubMenu: false
|
||||||
property bool isHovered: rootMouseArea.containsMouse
|
property bool isHovered: rootMouseArea.containsMouse
|
||||||
|
|
||||||
implicitWidth: Style.baseWidgetSize * 5.625 * scaling
|
implicitWidth: 200 * scaling
|
||||||
|
|
||||||
// Use the content height of the Flickable for implicit height
|
// Use the content height of the Flickable for implicit height
|
||||||
implicitHeight: Math.min(Screen.height * 0.9, flickable.contentHeight + (Style.marginMedium * 2 * scaling))
|
implicitHeight: Math.min(Screen.height * 0.9, flickable.contentHeight + (Style.marginMedium * 2 * scaling))
|
||||||
|
|
@ -117,7 +117,7 @@ PopupWindow {
|
||||||
} else {
|
} else {
|
||||||
// Calculate based on text content
|
// Calculate based on text content
|
||||||
const textHeight = text.contentHeight || (Style.fontSizeReduced * scaling * 1.2)
|
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
|
id: text
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: (modelData?.enabled
|
color: (modelData?.enabled
|
||||||
?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.applyOpacity(
|
?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOutline
|
||||||
Color.mOnSurface, 64)
|
|
||||||
text: modelData?.text ?? ""
|
text: modelData?.text ?? ""
|
||||||
font.pointSize: Style.fontSizeReduced * scaling
|
font.pointSize: Style.fontSizeReduced * scaling
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue