Programmatically, that assumes that that information is available (query a font rasterizer: where is the first pixel? consider also kerning and foreign languages; also query icon: where is the first non-background pixel? consider also theme information where window background might not show the icon well!).
Programmatically, you've un-aligned everything: now the amount of whitespace at the top of the notification is different than the amount of whitespace on the left of the notification.
Sure you might say it looks better. But how much time do you think it would require to make it look "pretty" (for you)? As-is, it's functional and isn't ugly. If you want to improve it, then go contribute to the libraries and applications being used.