mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 07:15:27 +00:00
Fix tooltip layout with Qt 6.9
This commit is contained in:
parent
c93f7e7385
commit
75359bb1c4
@ -69,9 +69,19 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// It would be better to use TextMetrics here, but it always lays out
|
||||||
|
// the text slightly more compactly than real Text does in ToolTip,
|
||||||
|
// causing unexpected line breaks to be inserted
|
||||||
|
Text {
|
||||||
|
id: tooltipTextLayoutHelper
|
||||||
|
visible: false
|
||||||
|
font: ToolTip.toolTip.font
|
||||||
|
text: ToolTip.toolTip.text
|
||||||
|
}
|
||||||
|
|
||||||
// This configures the maximum width of the singleton attached QML ToolTip. If left unconstrained,
|
// This configures the maximum width of the singleton attached QML ToolTip. If left unconstrained,
|
||||||
// it will never insert a line break and just extend on forever.
|
// it will never insert a line break and just extend on forever.
|
||||||
ToolTip.toolTip.contentWidth: ToolTip.toolTip.implicitContentWidth < 400 ? ToolTip.toolTip.implicitContentWidth : 400
|
ToolTip.toolTip.contentWidth: Math.min(tooltipTextLayoutHelper.width, 400)
|
||||||
|
|
||||||
function goBack() {
|
function goBack() {
|
||||||
if (clearOnBack) {
|
if (clearOnBack) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user