Reset tooltip delegate label height to defaults
ClosedPublic

Authored by broulik on Feb 1 2019, 8:42 AM.

Details

Summary

It seems Qt 5.12 changed the behavior of contentHeight to not include any font padding.

BUG: 401842
FIXED-IN: 5.15.0

Test Plan

Please someone test with Qt 5.11
The width is kept as otherwise the tooltip doesn't resize properly for some reason.
assigning undefined to height resets it to implicitHeight which includes some padding but not the huge padding Plasma's Label has (which was the main reason for setting contentHeight in the first place)

Before


After

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 1 2019, 8:42 AM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 1 2019, 8:42 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Feb 1 2019, 8:42 AM
ngraham added a subscriber: ngraham.Feb 1 2019, 3:10 PM
ngraham added inline comments.
applets/kicker/package/contents/ui/main.qml
227

If we do end up going with this patch, I'd like to see comments explaining why these are set to undefined.

mart added a subscriber: mart.Feb 9 2019, 9:53 AM
mart added inline comments.
applets/kicker/package/contents/ui/main.qml
227

look at https://doc.qt.io/qt-5/properties.html
at the RESET function (basically, properties that provide it, setting to undefined will reset to a default)

mart added a comment.Feb 9 2019, 9:56 AM

Supposedly fixed in Qt 5.12.1? https://bugreports.qt.io/browse/QTBUG-71684

with 5.12.1 the patch woudn't be necessary anymore?

mart accepted this revision.Mar 8 2019, 9:17 AM
This revision is now accepted and ready to land.Mar 8 2019, 9:17 AM
This revision was automatically updated to reflect the committed changes.