D19036: [notifications] Lift up notification content if one line of body text droops

Kai Uwe Broulik noreply at phabricator.kde.org
Fri Feb 15 14:38:29 GMT 2019


broulik added inline comments.

INLINE COMMENTS

> NotificationItem.qml:33
>      width: parent.width
> -    implicitHeight: bodyText.lineCount > 1 ? mainLayout.height : (appIconItem.valid || imageItem.nativeWidth > 0 ? (Math.max((mainLayout.height + 2 * units.smallSpacing),(units.iconSizes.large + 2 * units.smallSpacing))) : (bottomPart.height != 0 ? (mainLayout.height + 2 * units.smallSpacing) : (mainLayout.height + units.smallSpacing)))
> +    implicitHeight: bodyText.lineCount > 1 ? mainLayout.height : (appIconItem.valid || imageItem.nativeWidth > 0 ? (Math.max((mainLayout.height + 1.5 * units.smallSpacing),(units.iconSizes.large + 2 * units.smallSpacing))) : (bottomPart.height != 0 ? (mainLayout.height + (mainLayout.height > units.iconSizes.large ? 1.5 : 2) * units.smallSpacing) : (mainLayout.height + units.smallSpacing)))
>  

Can you please untangle this into a proper if statement

> NotificationItem.qml:175
>              top: parent.top
> -            topMargin: bodyText.lineCount > 1 ? 0 : units.smallSpacing // Lift up heading if bodyText is long
> +            topMargin: bodyText.lineCount > 1 ? 0 : (mainLayout.height > units.iconSizes.large ? 0.5 : 1) * units.smallSpacing // Lift up heading if bodyText is long or if text droops due to font size
>              left: appIconItem.valid || imageItem.nativeWidth > 0 ? appIconItem.right : parent.left

Is `smallSpacing` always even?

REPOSITORY
  R120 Plasma Workspace

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

To: rooty, #plasma, #vdg
Cc: broulik, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190215/0a7364d3/attachment-0001.html>


More information about the Plasma-devel mailing list