mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-21 07:05:59 +02:00
contextmenu: wrapping text instead of elision
Gitlab: #104 Change-Id: I22da3e93730b402a103ea80942de468c75ba88d8
This commit is contained in:
parent
22b9fe6374
commit
d06cfc962f
1 changed files with 5 additions and 10 deletions
|
@ -65,18 +65,13 @@ MenuItem {
|
||||||
anchors.left: contextMenuItemImage.right
|
anchors.left: contextMenuItemImage.right
|
||||||
anchors.leftMargin: 20
|
anchors.leftMargin: 20
|
||||||
anchors.verticalCenter: menuItemContentRect.verticalCenter
|
anchors.verticalCenter: menuItemContentRect.verticalCenter
|
||||||
width: textMetrics.boundingRect.width
|
width: contextMenuItemImage.visible ?
|
||||||
|
(preferredWidth - contextMenuItemImage.width - 58) :
|
||||||
|
preferredWidth - 24
|
||||||
height: 30
|
height: 30
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetrics
|
|
||||||
font: contextMenuItemText.font
|
|
||||||
elide: Text.ElideRight
|
|
||||||
elideWidth: contextMenuItemImage.visible ? (preferredWidth - contextMenuItemImage.width - 58) : preferredWidth - 24
|
|
||||||
text: itemName
|
text: itemName
|
||||||
}
|
wrapMode: Text.WordWrap
|
||||||
|
|
||||||
text: textMetrics.elidedText
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
font.pointSize: JamiTheme.textFontSize
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
Loading…
Add table
Reference in a new issue