Merge pull request #14022 from TryTwo/fix_balloontip_width

Settings BalloonTip: Have wordwrap use max width.
This commit is contained in:
Admiral H. Curtiss 2025-11-09 15:00:19 +01:00 committed by GitHub
commit c97d2af814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,8 +104,12 @@ BalloonTip::BalloonTip(PrivateTag, const QString& title, QString message, QWidge
const int max_width = label->screen()->availableGeometry().width() / 3;
label->setMaximumWidth(max_width);
if (label->sizeHint().width() > max_width)
{
label->setWordWrap(true);
label->setMinimumWidth(max_width);
}
return label;
};