[Default Tooltip] Fix sizing
ClosedPublic

Authored by broulik on Jan 24 2018, 2:58 PM.

Details

Summary

Unset the Label's default height which completely confuses the renderer either shifting the item vertically (e.g. when toggling system tray popup), or letting it get too wide (e.g. when moving from a two-line tooltip to a one-line tooltip). Also let the Layouts figure out sizing rather than trying to overrule it with flaky values.

BUG: 386260
BUG: 389371

Test Plan
  • Opened and closed System Tray popup, tooltip was correctly aligned now (bug 389371)

  • Moved from NM to Battery plasmoid, tooltip was correctly sized now (bug 386260)
  • Moved from task manager tooltip to kickoff and vice-versa, was still correct
  • Observed all tooltips having a sane size.

When subtext linebreaks the tooltip can appear too wide because the word wrapped onto the next line but this isn't easily fisable, not without using a separate TextMetrics instance and other sledgehammer methods

Diff Detail

Repository
R242 Plasma Framework (Library)
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.Jan 24 2018, 2:58 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 24 2018, 2:58 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jan 24 2018, 2:58 PM
broulik edited the summary of this revision. (Show Details)
mart accepted this revision.Jan 26 2018, 1:01 PM
This revision is now accepted and ready to land.Jan 26 2018, 1:01 PM
This revision was automatically updated to reflect the committed changes.