Set a (max) content width for HToolTip
This commit is contained in:
		@@ -5,6 +5,11 @@ ToolTip {
 | 
				
			|||||||
    id: toolTip
 | 
					    id: toolTip
 | 
				
			||||||
    delay: theme.controls.toolTip.delay
 | 
					    delay: theme.controls.toolTip.delay
 | 
				
			||||||
    padding: background.border.width
 | 
					    padding: background.border.width
 | 
				
			||||||
 | 
					    contentWidth: Math.min(
 | 
				
			||||||
 | 
					        mainUI.width / 1.25,
 | 
				
			||||||
 | 
					        contentItem.implicitWidth,
 | 
				
			||||||
 | 
					        theme.fontSize.normal * 0.5 * 75,
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    background: Rectangle {
 | 
					    background: Rectangle {
 | 
				
			||||||
        id: background
 | 
					        id: background
 | 
				
			||||||
@@ -16,6 +21,9 @@ ToolTip {
 | 
				
			|||||||
    contentItem: HLabel {
 | 
					    contentItem: HLabel {
 | 
				
			||||||
        color: theme.controls.toolTip.text
 | 
					        color: theme.controls.toolTip.text
 | 
				
			||||||
        text: toolTip.text
 | 
					        text: toolTip.text
 | 
				
			||||||
 | 
					        wrapMode: Text.Wrap
 | 
				
			||||||
 | 
					        property var pr: width
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        leftPadding: theme.spacing / 1.5
 | 
					        leftPadding: theme.spacing / 1.5
 | 
				
			||||||
        rightPadding: leftPadding
 | 
					        rightPadding: leftPadding
 | 
				
			||||||
        topPadding: theme.spacing / 2
 | 
					        topPadding: theme.spacing / 2
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user