Bug 404407 - Notification (heading + one line) not vertically centered with respect to icon
Summary: Notification (heading + one line) not vertically centered with respect to icon
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (other bugs)
Version First Reported In: 5.15.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Krešimir Čohar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-15 17:42 UTC by Krešimir Čohar
Modified: 2019-03-09 16:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.15.3
Sentry Crash Report:


Attachments
Screenshot with and without the bug (30.67 KB, image/jpeg)
2019-02-15 17:42 UTC, Krešimir Čohar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krešimir Čohar 2019-02-15 17:42:11 UTC
Created attachment 118115 [details]
Screenshot with and without the bug

SUMMARY
At the moment, the text of a notification (Noto Sans 10 pt) that has a heading and one line of text isn't vertically centered with respect to the icon (doesn't have even padding above and below the text).

STEPS TO REPRODUCE
1. Run notify-send with a random square icon and a Heading + One Line of Text.

OBSERVED RESULT
The padding above and below the content is even with respect to the notification text, but not the icon.

EXPECTED RESULT
The padding above and below the content is even with respect to both the notification text and the icon.

SOFTWARE/OS VERSIONS)
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 1 Krešimir Čohar 2019-02-15 17:42:35 UTC
This diff deals with the fix: https://phabricator.kde.org/D19036
Comment 2 Krešimir Čohar 2019-03-09 16:14:03 UTC
Git commit 23f3345a22878eadc58a54eed27ad9a231877bca by Krešimir Čohar.
Committed on 09/03/2019 at 16:12.
Pushed by chopete into branch 'Plasma/5.15'.

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

Summary:
This patch lifts up the text content of notifications in which the combination of a single line of body text and its heading are taller than their icon and thereby prevents the notification content from drooping too far down and having too much of a bottom margin if it should become much larger than the icon. Seeing as the icon and its margins are never going to be taller than the content in question and the icon is always going to have 1 units.smallSpacing above it, this patch adjusts the height accordingly (0.5 units of smallSpacing above + 0.5 for the spacing below the heading + 0.5 below the content, accommodating the text) to achieve more even padding.
This patch should also improve padding with fonts greater than 10 pt in size.
FIXED-IN: 5.15.3

Test Plan:
Before (left) and after (right):
{F6616780}

Reviewers: #plasma, #vdg, broulik, ngraham, filipf

Reviewed By: #vdg, ngraham, filipf

Subscribers: cfeck, anthonyfieroni, filipf, ngraham, abetts, broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19036

M  +15   -3    applets/notifications/package/contents/ui/NotificationItem.qml

https://commits.kde.org/plasma-workspace/23f3345a22878eadc58a54eed27ad9a231877bca