D17975: [Notifications] Add padding to notifications

Root noreply at phabricator.kde.org
Thu Jan 10 20:49:24 GMT 2019


rooty added a comment.


  In D17975#390875 <https://phabricator.kde.org/D17975#390875>, @ngraham wrote:
  
  > With this patch: F6539252: With patch.png <https://phabricator.kde.org/F6539252>
  
  
  TLDR: Yup, but that's only **the tip of the iceberg** (of the problems that plague //both master and this patch//)
  
  It's the problem I described two comments ago:
  
  > However, if another font is used, the amount of padding below the icon changes (Cabin - 5 px, Lato - 3 px etc.). It's because I've been using bottomPart or the implicitHeight to make the notification "taller" so as to give the icon padding.
  >  Is there a way to give the icon itself padding? I've been using anchors but there's nothing I can think of to anchor it to? If I anchor it to the notification text in any way, I can add a margin, sure, but it gets //stretched out beyond belief// if there's too much text.
  
  I've been using fonts to illustrate the problem but your screenshots //do a better job.//
  In addition, changing the height of the **icon** results in several binding loops (gross), or in an icon that's not a square (album art), or the situation in your second screenshot. Hardly ideal.
  
  I just don't know how to add bottom padding //to the notification icon itself// and have the height of the notification adapt accordingly.
  
  P.S. This did, however, shed some light on things that have been bothering me about the current master.
  
  > Status quo: F6539251: Without the patch.png <https://phabricator.kde.org/F6539251>
  
  Should this happen? There's no description yet there's an empty space. The icon doesn't resize accordingly. This is what happens in master with fonts >10pt and scaling that's a non-integer that's not a multiple of 0.5 (1.1, 1.2, 1.3 etc.), resulting in padding underneath the icon (not the notification text!) and none above. For example:
  F6539300: image.png <https://phabricator.kde.org/F6539300>
  The plot thickens - another screenshot of **master** (not this patch)
  F6539302: image.png <https://phabricator.kde.org/F6539302>
  I'm assuming this second one is because of the close button. This doesn't happen with this patch but I'm assuming I merely obscured the problem rather than solved it.
  
  I'm at a loss as to how to proceed. The padding problems result from:
  
  - in master, because the icon is defined as "units.iconSizes.largeSpacing" without any regard for the user's font (or scaling factor actually, except when it's 1.5, 2, 2.5, 3)
  - in this patch, because of the units.iconSizes.largeSpacing thing and my lack of proficiency in QML and inability to give the icon padding without manipulating either its height or that of the entire notification (doing the former results in **several binding loops** OR an icon that's **distorted in size** and isn't a square... doing the latter results in the problem depicted in your screenshots)

REPOSITORY
  R120 Plasma Workspace

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

To: rooty, #vdg, #plasma, ngraham, davidedmundson
Cc: broulik, Codezela, abetts, filipf, davidedmundson, hein, ndavis, plasma-devel, kvanton, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190110/65c7e1c1/attachment-0001.html>


More information about the Plasma-devel mailing list