mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-13 12:05:22 +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.leftMargin: 20
|
||||
anchors.verticalCenter: menuItemContentRect.verticalCenter
|
||||
width: textMetrics.boundingRect.width
|
||||
width: contextMenuItemImage.visible ?
|
||||
(preferredWidth - contextMenuItemImage.width - 58) :
|
||||
preferredWidth - 24
|
||||
height: 30
|
||||
|
||||
TextMetrics {
|
||||
id: textMetrics
|
||||
font: contextMenuItemText.font
|
||||
elide: Text.ElideRight
|
||||
elideWidth: contextMenuItemImage.visible ? (preferredWidth - contextMenuItemImage.width - 58) : preferredWidth - 24
|
||||
text: itemName
|
||||
}
|
||||
|
||||
text: textMetrics.elidedText
|
||||
text: itemName
|
||||
wrapMode: Text.WordWrap
|
||||
font.pointSize: JamiTheme.textFontSize
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
Loading…
Add table
Reference in a new issue