D24070: Don't use toolTipMainText to show info, rather use the second line

Nathaniel Graham noreply at phabricator.kde.org
Fri Sep 27 16:34:53 BST 2019


ngraham requested changes to this revision.
ngraham added a comment.
This revision now requires changes to proceed.


  From what I can tell, the problem with  `remainingTime` being 0 sometimes is a pre-existing bug that the current code is hiding fairly well by not showing the string that uses that value when the time is 0. We should fix that later, but for now what we should do is replicate the hiding logic for all cases in the new style too (see inline comment). Than I think this can go in, pending @broulik's approval.

INLINE COMMENTS

> batterymonitor.qml:93
> +        }
> +        if (pmSource.data["AC Adapter"] && pmSource.data["AC Adapter"]["Plugged in"]) {
> +            return i18n("%1 until fully charged", KCoreAddons.Format.formatDuration(remainingTime, KCoreAddons.FormatTypes.HideSeconds))

This block also needs` if (remainingTime > 0) {` like the one below it

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D24070

To: mthw, ngraham, #vdg, #plasma, broulik, ndavis
Cc: ndavis, broulik, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190927/129efa4c/attachment-0001.html>


More information about the Plasma-devel mailing list